Search Unity

Bug Facebook API (unable to validate token)

Discussion in 'Authentication' started by Webtopsolutions, Apr 27, 2023.

  1. Webtopsolutions

    Webtopsolutions

    Joined:
    Sep 8, 2022
    Posts:
    1
    Hello
    I'm having a problem with the Facebook Authentication Provider, when I make a post request to the API, it gives a 401 response code.

    Code (CSharp):
    1.  
    2. {
    3. "title": "PERMISSION_DENIED",
    4. "detail": "unable to validate token",
    5. "details": [],
    6. "status": 401
    7. }
    8.  
    The app ID and app secret are set correctly.
    I have tested a real facebook profile in live and development mode and i have tried to use the token generated from facebook developer console and i have the same result.

    Updated
    I found a problem in the permission granted, my Facebook app type is gaming service and I have gaming_profile permission instead of public_profile , i tested with non gaming service type with public_profile perminssion and its working

     
    Last edited: Apr 28, 2023
    vuthang and mahdik_unity like this.