Search code examples
facebook-graph-api

How to revoke all permission on facebook api using rest api


I trying to revoke all permission on withdrawl user facebook document said will be conducted by calling Url with 'user access token or app access token

https://graph.facebook.com/me/{user_id}/permissions

but i cant attaching user access token in this request, but i can attach app access token in query params. so i requested this url with app access token, but response message is "An active access token must be used to query information about the current user."

Can I really request it with an app access token?


Solution

  • /me/{user_id}/ makes no sense as request path here.

    You either use /me, in combination with a user or page token - then that alias will resolve to the actual ID of the entity the token belongs to.
    Or you use an app-scoped user ID directly.

    If you want to perform any actions on a user account using the app access token, then you must use the second version.

    https://graph.facebook.com/{user_id}/permissions?access_token={app_access_token}