De-authorize a Facebook app using the new OpenGraph API
I have this code to de-authorize my FB application for currently logged in user:
FB.api({ method: 'Auth.revokeAuthorization' });
It's using the开发者_开发技巧 deprecated REST API. How do I do the same using the OpenGraph API with FB.api method?
I figured it out:
FB.api("/me/permissions", "delete", function(response){});
In graph API you can issue HTTP DELETE request to
https://graph.facebook.com/_UID_/permissions
this should deauthorize the app
精彩评论