WordPress.org

Ready to get started?Download WordPress

Forums

Really simple Facebook Twitter share buttons
[resolved] FB.getLoginStatus() called before calling FB.init() (3 posts)

  1. laserjobs
    Member
    Posted 10 months ago #

    There seems to be a small error coming up in my developer screen for FB.getLoginStatus() called before calling FB.init().

    http://stackoverflow.com/questions/12810018/fb-getloginstatus-called-before-calling-fb-init

    It seems that adding "status=0" to the all.js call fixes the issue.
    //connect.facebook.net/fr_FR/all.js#xfbml=1&status=0

    I added &status=0 to really-simple-facebook-twitter-share-buttons.php in lines 114 and 305 and the warnings went away.

    Line 114
    js.src = "//connect.facebook.net/'.$really_simple_share_option['locale'].'/all.js#xfbml=1&status=0'.$app_id.'";

    Line 305
    js.src = "//connect.facebook.net/'.$option['locale'].'/all.js#xfbml=1&status=0'.$app_id.'";

    http://wordpress.org/plugins/really-simple-facebook-twitter-share-buttons/

  2. whiletrue
    Member
    Plugin Author

    Posted 10 months ago #

    Hi laserjobs,
    the issue is now fixed in the 2.11.1 plugin release.
    Thanks for reporting it!

  3. laserjobs
    Member
    Posted 10 months ago #

    Not quite fixed

    js.src = "//connect.facebook.net/'.$really_simple_share_option['locale'].'/all.js#xfbml=1(ampersand A M P ;)status=0'.$app_id.'";

    Needs to be

    js.src = "//connect.facebook.net/'.$really_simple_share_option['locale'].'/all.js#xfbml=1&status=0'.$app_id.'";

  4. whiletrue
    Member
    Plugin Author

    Posted 10 months ago #

    Hi laserjobs,
    the "amp;" is for xhtml compatibility, anyway I'm uploading the new 2.11.2 release without it. Cheers!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.