tmort / Socialite

Other
1.68k stars 163 forks source link

FB.getLoginStatus() called before calling FB.init(). #43

Closed dylang closed 9 years ago

dylang commented 11 years ago

This is printed in the console log on every page load - even on the demo site.

FB.getLoginStatus() called before calling FB.init().

I'm not sure the cause, some answers on StackOverflow suggest Facebook's API might have changed.

kayue commented 11 years ago

+1

helphop commented 11 years ago

+1

emma-andersson commented 11 years ago

+1

johnbacon commented 11 years ago

+1

lafeber commented 11 years ago

+1

ghost commented 11 years ago

+1

kiran-aghor commented 11 years ago

+1

harrietgrace commented 11 years ago

+1

seansheds commented 11 years ago

+1

cordoval commented 11 years ago

:baby: :+1:

mothm4n commented 11 years ago

i fixed this problem, look this link show how to do it, http://stackoverflow.com/questions/3548493/how-to-detect-when-facebooks-fb-init-is-complete

otravers commented 10 years ago

mothm4n, can you please post or commit your code in case you edited Socialite itself to resolve this issue?

mothm4n commented 10 years ago

this is de code.

http://pastebin.com/QV16cmNW

tmort commented 10 years ago

Otravers/Mothm4m,

I took a look at the code and branched Socialite.js locally to see if it works. Unfortunately it doesn't seem to fix the issue. I did some reading on the Facebook Like Button documentation, and it seems that the reason this error is coming up is because the APP_ID is not being passed (Socialite.js naturally passes "null" if you do not define an app id).

I created a quick Facebook app to test this and it worked. The error disappears if the app id is defined. The code in pastebin above actually breaks the facebook integration inside of Socialite.js. Mothm4n, did the code work for you? If so, please link me to a page where I can see how it is implemented and why there is a conflict.

vojtech-dobes commented 10 years ago

I have to confirm solving this issue by setting App ID.

otravers commented 10 years ago

Setting app ID indeed solves the issue for me.

dylang commented 9 years ago

sounds like people have a solution.