• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

rellect

Well-known member
#1
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.
 

Mike

XenForo developer
Staff member
#2
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.