1. 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

Discussion in 'Resolved Bug Reports' started by rellect, Oct 31, 2014.

  1. rellect

    rellect Well-Known Member

    I noticed that on fresh installation there are two warnings in the console, coming from the facebook sdk
    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.
  2. Mike

    Mike XenForo Developer Staff Member

    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.

Share This Page