Completed
Last Updated: 26 Sep 2014 12:56 by ADMIN
ADMIN
Danail Vasilev
Created on: 20 Mar 2014 08:11
Category: SocialShare
Type: Bug Report
0
FIX RadSocialShare's RadFacebookButton displays warning message - FB.init has already been called
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>
0 comments