Visitar URL original
Facebook invalid access token in production build · Issue #619 · NativeScript/plugins · GitHub
Skip to content

Facebook invalid access token in production build #619

Description

@GergelyNemes

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?

Image

Activity

  1. PsHye commented on Apr 9, 2025

    @PsHye

    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

  2. GergelyNemes commented on Apr 14, 2025

    @GergelyNemes
    Author

    I find a solution. You have to enable tracking for your application before you try to use facebook login.

  3. felixkrautschuk commented on May 14, 2025

    @felixkrautschuk
    Contributor

    @GergelyNemes but if you show the ATT dialog and the user refuses tracking, the access token is still invalid :(

  4. felixkrautschuk commented on May 15, 2025

    @felixkrautschuk
    Contributor

    I made a PR, where the authenticationToken is added to the LoginResult.
    #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions