1

I have seen many questions on here that are relatively similar, but most recommend a solution involving an APPID. However, I simply want to solve the error being outputted from the like button, no APPID necessary, the like button is working but producing irritating output in the console.

I am getting the following error in my Guard output: http://connect.facebook.net/en_US/all.js|54|FB.getLoginStatus() called before calling FB.init().

With a similar error in my web console: FB.getLoginStatus() called before calling FB.init().

I have this block in my app.js file:

(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

And the following in my markup right inside the <body>:

.facebook-like#fb-root
.fb-like(data-href="https://www.facebook.com/MYAPP" data-send="false" data-layout="button_count" data-width="90" data-show-faces="true")
4

1 回答 1

0

我认为您的问题是 facebook.net 目前已关闭。

于 2012-10-04T17:34:20.120 回答