Facebook invalid access token in production build
Hi.
I have a problem with facebook login on IOS when i build to production. The login is working fine when i'm building the app with "ns debug ios" to test it on my phone but when the app is built to production i get an access token from facebook witch is invalid. When i put the token into facebook Access token debugger it's says "Invalid OAuth access token - Cannot parse access token". Does anybody run into the same issue?
Same happens to me, it seems that that the tokenString property is returning a nonvalid, the plugin should return something like "EEAGtoken" but its seems it's different and invalid for graph.facebook to work
Tested in iOS at v3.0.0
Edited: April 10, 2025:
I went back to the v2.2.0 and its working now, so the problem is in the current version
I find a solution. You have to enable tracking for your application before you try to use facebook login.
@GergelyNemes but if you show the ATT dialog and the user refuses tracking, the access token is still invalid :(
I made a PR, where the authenticationToken is added to the LoginResult. https://github.com/NativeScript/plugins/pull/624 In case the user opts out of ATT, the authenticationToken must be sent to backend instead of the invalid access token, but it is missing in the current plugin version 3.0.0.
https://developers.facebook.com/docs/facebook-login/limited-login/ios