There are a number of useful parameters to Twitter's Tweet button that it'd be great to set using the RadSocialShare interface, notably the "via" parameter, which tacks on a related Twitter account to the end of a tweet, as in: "Check out this great site! http://www.url.com/ via @GreatSites", and the "hashtags" parameter, which tacks on hashtags. Available properties are listed here: https://dev.twitter.com/docs/tweet-button#properties.
This can be done by exposing the email message that will be generated in an event (e.g. several fields in the event arguments - from, to, subject, body). There can be both client-side and server-side events to allow using different APIs. A client-side event should be cancellable to prevent the callback we generate by default. The issue with a client-side event is that the Captcha cannot be validated on the client, only on the server, so a client-side event can create an opportunity for spam and abuse.
The print button will be part of the styled buttons collection, similar to the MailTo and SendEmail buttons.
For the time being you can place the following JavaScript workaround below the SocialShare's declaration: <telerik:RadSocialShare ID="RadSocialShare1" runat="server"> <MainButtons> <telerik:RadLinkedInButton /> </MainButtons> </telerik:RadSocialShare> <script> var LinkedInnonSecureAnonymousScript = "//platform.linkedin.com/js/secureAnonymousFramework?v=0.0.2000-RC8.57838-1429", $T = Telerik.Web.UI; $T.RadSocialShare.prototype.initialize = function () { $T.RadSocialShare.callBaseMethod(this, "initialize"); if (this._addLinkedInScript) { window[this.get_id() + 'linkedInHandler'] = Function.createDelegate(this, this._linkedInShare); this._addScriptBlock(this._getStandardButtonUrl("linkedInPlatform")); var t = this; setTimeout(function () { t._addScriptBlock(LinkedInnonSecureAnonymousScript); }, 10); } var rtlElement = this.get_element(); if ($telerik.isRightToLeft(rtlElement)) Sys.UI.DomElement.addCssClass(rtlElement, "sshRtl"); this._ulElement = this.get_element().getElementsByTagName("ul")[0]; this.configureButtons(true); this.configureCompactPopup(); this.configureEmailPopup(); if (this._addFbScript || this._addTwitterScript || this._addGoogleScript || this._addLinkedInScript || this._addYammerScript || this._addPinterestScript) { if (this._addFbScript) { this._addScriptBlock(this._getStandardButtonUrl("facebookscript")); } if (this._addGoogleScript) { this._addScriptBlock(this._getStandardButtonUrl("googlescript")); } if (this._addTwitterScript) { this._addScriptBlock(this._getStandardButtonUrl("twitterscript")); } if (this._addPinterestScript) { this._addScriptBlock(this._getStandardButtonUrl("pinterestscript")); } if (this._addYammerScript) { this._initScriptButtons(this._getStandardButtonUrl("yammerscript"), Function.createDelegate(this, function () { this.addYammerButtons(); })); } setTimeout(Function.createDelegate(this, this.parseGeneratedButtons), 300); } var fakeElement = $get(this.get_id() + "_IEHack"); if ($telerik.isIE && fakeElement) fakeElement.parentNode.removeChild(fakeElement); if (this.get_gaEnabled()) { var scriptPrefix = ("https:" == document.location.protocol) ? "https://ssl" : "http://www"; this._addScriptBlock(scriptPrefix + this._getStandardButtonUrl("ga")); } } $T.RadSocialShare.prototype.parseGeneratedButtons = function () { var twttr = window.twttr, IN = IN; if (this._addFbScript) { try { if (!window.fbAsyncInit) { window.fbAsyncInit = Function.createDelegate(this, function () { window.FB.init({ appId: this.get_fbAppId(), status: true, cookie: true, xfbml: true, version: FACEBOOK_VERSION }); this.attachFacebookEvents(); }); } else { var FB = window.FB; if (FB && FB.XFBML && FB.XFBML.parse && window.fbAsyncInit.hasRun) { FB.XFBML.parse(this.get_element()); this.attachFacebookEvents(); } } } catch (ex) { } } if (this._addTwitterScript && typeof (twttr) != 'undefined' && twttr) { twttr.widgets.load(); if (!this._twEventsAdded) { twttr.events.bind('tweet', Function.createDelegate(this, this._tweet)); this._twEventsAdded = true; } } if (this._addGoogleScript && typeof (gapi) != 'undefined' && window.gapi) window.gapi.plusone.go(this.get_element()); if (this._addLinkedInScript && typeof (IN) != 'undefined' && $(document.documentElement).find("script[src='https:" + LinkedInnonSecureAnonymousScript + "']").length > 0) setTimeout(function () { if (typeof (IN.parse) != 'undefined') window.IN.parse(); }, 500); } </script>
Hello,
In the social share there is no option for Instagram.
Is there a workaround?
This should be an additional property in the EmailSettings that will point to the port, so it can be used in the SmtpClient constructor: http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx
Sometimes there are local less world known share websites that are not supported out of the box by the RadSocialShare. An empty template similar to the one for a Styled button can be added where you can place your own button's markup so that a more uniform look can be achieved while keeping the desired functionality. In the meantime, the approach from the following code library project can be used so you can add custom buttons: http://www.telerik.com/support/code-library/add-pinterest---pin-it-button-to-radsocialshare Another approach you can take is to use the control's API (http://docs.telerik.com/devtools/aspnet-ajax/controls/socialshare/client-side-programming/radsocialshare-object) and events (http://docs.telerik.com/devtools/aspnet-ajax/controls/socialshare/client-side-programming/events/onsocialbuttonclicking) and a social network you will not be using as a custom button. For example, Digg: <telerik:RadSocialShare runat="server" ID="RadSocialShare1" OnSocialButtonClicking="OnSocialButtonClicking" UrlToShare="somePage.aspx" TitleToShare="some title"> <MainButtons> <telerik:RadSocialButton SocialNetType="Digg" /> </MainButtons> </telerik:RadSocialShare> <script> function OnSocialButtonClicking(sender, args) { if (args.get_socialNetType() == "Digg") { args.set_cancel(true); window.open( "someSocialNetworkSharingUrl.html?url=" + sender.get_urlToShare() + "&title=" + sender.get_titleToShare()); //use the URL according to your social network and escape strings as needed } } </script> <style> div.RadSocialShare .sshDigg, div.RadSocialShare .sshDigg:hover { background-image: url('images/icon_16x16.png'); background-position: 0 0; } </style>
Issue will be fixed for Q3 2014 release.
Issue will be fixed for Q3 2014 release. For the time being the following JavaScript workaround can be used: <telerik:RadSocialShare ID="RadSocialShare" runat="server" UrlToShare='http://www.google.com' FacebookAppId="1402849693262733" TitleToShare='title to share'> <MainButtons> <telerik:RadFacebookButton ButtonLayout="ButtonCount" /> </MainButtons> </telerik:RadSocialShare> <script> var $T = Telerik.Web.UI; $T.RadSocialShare.prototype.parseGeneratedButtons = function () { if (this._addFbScript) { try { if (FB && FB.XFBML && FB.XFBML.parse) FB.XFBML.parse(this.get_element()); if (!this._fbEventsAdded) { FB.Event.subscribe('edge.create', Function.createDelegate(this, this._fbLike)); FB.Event.subscribe('edge.remove', Function.createDelegate(this, this._fbUnLike)); FB.Event.subscribe("message.send", Function.createDelegate(this, this._fbSend)); this._fbEventsAdded = true; } } catch (ex) { } } if (this._addTwitterScript && typeof (twttr) != 'undefined' && twttr) { twttr.widgets.load(); if (!this._twEventsAdded) { twttr.events.bind('tweet', Function.createDelegate(this, this._tweet)); this._twEventsAdded = true; } } if (this._addGoogleScript && typeof (gapi) != 'undefined' && gapi) gapi.plusone.go(this.get_element()); if (this._addLinkedInScript && typeof (IN) != 'undefined' && $(document.documentElement).find("script[src='http://platform.linkedin.com/js/nonSecureAnonymousFramework?v=0.0.1143-RC1.16308-1337']").length > 0) setTimeout(function () { if (typeof ("IN.parse") != 'undefined') IN.parse(); }, 500); } </script>
Available with Q3.2014
A workaround is to add the following script override after your script manager that will change the default URLs used for the third party scripts: Telerik.Web.UI.RadSocialShare.SocialNetUrls = { "ShareOnTwitter": "http://twitter.com/intent/tweet?url=[u]&text=[t]", "ShareOnGooglePlus": "https://plus.google.com/share?url=[u]", "GoogleBookmarks": "https://www.google.com/bookmarks/mark?op=add&bkmk=[u]&title=[t]", "LinkedIn": "//www.linkedin.com/shareArticle?mini=true&url=[u]&title=[t]", "Delicious": "http://delicious.com/save?url=[u]&title=[t]", "Blogger": "http://www.blogger.com/blog_this.pyra?t=&u=[u]&n=[t]", "Digg": "http://digg.com/submit?url=[u]&title=[t]", "Reddit": "http://www.reddit.com/submit?url=[u]&title=[t]", "StumbleUpon": "http://www.stumbleupon.com/submit?url=[u]&title=[t]", "MySpace": "http://www.myspace.com/Modules/PostTo/Pages/?u=[u]&t=[t]", "Tumblr": "http://www.tumblr.com/share/link?url=[u]&name=[t]", "MailTo": "mailto:?body=[u]&subject=[t]", "ShareOnFacebook": "http://www.facebook.com/sharer.php?u=[u]&t=[t]", "linkedInPlatform": "//platform.linkedin.com/in.js?async=true", "facebookscript": "//connect.facebook.net/[locale]/sdk.js", "googlescript": "//apis.google.com/js/plusone.js", "twitterscript": "//platform.twitter.com/widgets.js", "ga": ".google-analytics.com/ga.js", yammerscript: "https://c64.assets-yammer.com/assets/platform_embed.js", ShareOnYammer: "https://www.yammer.com/home/bookmarklet?bookmarklet_pop=1&u=[u]&t=[t]", PinIt: "//pinterest.com/pin/create/button/?media=[m]&url=[u]&description=[d]", pinterestscript: "//assets.pinterest.com/js/pinit.js?r=" + Math.random(), ShareOnPinterest: "//assets.pinterest.com/js/pinit.js", pinterestBookmarkletScript: "//assets.pinterest.com/js/pinmarklet.js" };