astropanic
astropanic

Reputation: 10939

Check Facebook access token rights for an app

User authorized FB app number 12345678 to access his info

User access token is 11223344556677889900

User goes to Facebook dashboard and deauthorized the FB app number 12345678

How I can chceck if the user can stil use the access token 11223344556677889900 to call some FB.ui methods on the app number 12345678 ?

Upvotes: 1

Views: 652

Answers (2)

Simon Cross
Simon Cross

Reputation: 13345

If you use the javascript SDK, you should call

FB.getLoginStatus(function(response){
//handle response here
})

This will tell you if the user is connected to your app or not. If they are, you'll get a fresh, valid, access token returned.

Docs: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/

Upvotes: 1

bool.dev
bool.dev

Reputation: 17478

No, check this paragraph in Facebook docs :

App Deauthorization

When a user of your app removes it in the App Dashboard or blocks the app in the News Feed, your app can be notified by specifying a Deauthorize Callback URL in the Developer App. During app removal we will send an HTTP POST request containing a single parameter, signed_request, which contains the user id (UID) of the user that just removed your app. You will not receive an user access token in this request and all existing user access tokens will be automatically expired.

Link to said doc

Upvotes: 0

Related Questions