I'm using debug.js
and getting the following message when executing FB.login
:
You are overriding current access token, that means some other app is expecting different access token and you will probably break things. Please consider passing access_token directly to API parameters instead of overriding the global settings.
Any clues?
This setting is in the Products > Facebook Login > Settings section of the App Dashboard. Disable this setting if you are not building a custom web login flow or using the Facebook Login SDK on the web. Enforce HTTPS.
An access token is an opaque string that identifies a user, app, or Page and can be used by the app to make graph API calls. When someone connects with an app using Facebook Login and approves the request for permissions, the app obtains an access token that provides temporary, secure access to Facebook APIs.
I solved the issue, the problem was that I was requesting a permission that the app was not approved for, and not using an FB account that was associated with the app in any way. By adding the user in question as a test user, the problem was solved. It's rather unfortunate that the error Facebook returns is so completely useless in this case. Hope this helps!
It is probably because you called FB.getLoginStatus followed by FB.login. The error just means that you received an access token the first time when you called .getLoginStatus and then it was overwritten when you called .login.
You can fix this by either removing .getLoginStatus (it is probably unnecessary if you are about to call .login) or instead re-use the access token from .getLoginStatus and pass it to the .login function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With