tweet button error

3 posts, 0 answers
  1. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 17 Mar 2014 Link to this post

    I am getting all kinds of errors when using RadSocialShare.

    <telerik:RadSocialShare ID="RadSocialShare" runat="server" UrlToShare='<%# String.Format("{0}#comments", ((DataRowView)Container.DataItem)["NavigateUrl"]) %>'
                            TitleToShare='<%# ((DataRowView)Container.DataItem)["blogTitle"] %>'>
                            <MainButtons>
                                <telerik:RadTwitterButton CounterMode="Horizontal" />
                                <telerik:RadLinkedInButton CounterMode="Horizontal" ShowZeroCount="true" />
                                <telerik:RadGoogleButton AnnotationType="Bubble" ButtonSize="Medium" />
                                <telerik:RadFacebookButton ButtonLayout="ButtonCount" />
                            </MainButtons>
                        </telerik:RadSocialShare>


    the errors are:

    Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
    FB.getLoginStatus() called before calling FB.init(). all.js:56
    FB.init has already been called - this could indicate a problem all.js:56
    Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
    FB.getLoginStatus() called before calling FB.init(). all.js:56
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) tweet_button.1393899192.html:1
    event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

    Thanks, Marty
  2. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 17 Mar 2014 in reply to moegal Link to this post

    I see the same errors int e chrome console on the telerik demo at:

    http://demos.telerik.com/aspnet-ajax/socialshare/examples/googleanalytics/defaultcs.aspx

    Marty
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 20 Mar 2014 Link to this post

    Hello Marty,

    Please find my comments and suggestions about the mentioned warning messages:

    1)Invalid App Id - This error message is shown because you have not specified the facebook's appID. More information on how to get it is available in this blog post.
    2)"FB.getLoginStatus() called before calling FB.init()" and "FB.init has already been called" warning messages  - These are issues with the control. I have logged them in our feedback portal here and here, so that you can monitor, comment and vote on them. For the last warning message you can use the provided workaround in the feedback item:
    <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>
    Note that the JavaScript function override must be placed after the declaration of the RadSocialShare.

    3)Consider using 'dppx' units instead of 'dpi' - This is an issue with the Tweet Button's scripts that RadSocialShare integrates under Chrome browsers, and there is nothing we can do about it. You can reproduce it with the following code under Chrome:
    <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://dev.twitter.com" data-via="your_screen_name" data-lang="en">Tweet</a>
            <script>!function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); } }(document, "script", "twitter-wjs");</script>

    As a small token of gratitude for reporting the mentioned issues to us, I have updated your Telerik points.

    Regards,
    Danail Vasilev
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top