Facebook API SDK revoke access

Solution 1:

For the FB JavaScript SDK:

FB.api('/me/permissions', 'delete', function(response) {
    console.log(response); // true
});

Solution 2:

in the graph API for the user object you can issue an HTTP DELETE request to /PROFILE_ID/permissions to revoke authorization for an app.

from the official documentation (developers.facebook.com/docs/reference/api/user/):

You can de-authorize an application or revoke a specific extended permissions on behalf of a user by issuing an HTTP DELETE request to PROFILE_ID/permissions with a user access_token for that app.

Parameter Description Type Required permission The permission you wish to revoke. If you don't specify a permission then this will de-authorize the application completely. string no You get the following result.

Description Type True if the delete succeeded and error otherwise. boolean