Fixed Don't run FB.getLoginStatus() if no App Id specified

refael

Well-known member
I noticed that on fresh installation there are two warnings in the console, coming from the facebook sdk
HTML:
Invalid App Id: Must be a number or numeric string representing the application id. sdk.js:56
FB.getLoginStatus() called before calling FB.init(). sdk.js:56

My first thought was why the sdk is forced to be loaded.., I know it's for the like button and similar things, but I think the app id is required for these things.

Anyway, the second warning about FB.getLoginStatus() can be avoided, as without the app id it can't check if the user is authenticated.. so it should run only if app id specified.
 
It's not possible to prevent the first error -- even if you don't pass the appId (which is allowed, it's an optional param) it will give you that warning. You're right about the login status check though so I've tweaked the logic here.
 
Back
Top Bottom