I am developing a facebook application, I want to remove my application from a user using Graph API, is there any way to do this.
Asked
Active
Viewed 9,546 times
8
-
possible duplicate of [Facebook API SDK revoke access](http://stackoverflow.com/questions/9050190/facebook-api-sdk-revoke-access) – Zach Lysobey Mar 26 '15 at 15:23
2 Answers
25
When the user is connected, do:
FB.api("/me/permissions","DELETE",function(response){
console.log(response); //gives true on app delete success
});

Qlimax
- 5,241
- 4
- 28
- 31
-
1I keep getting "An active access token must be used to query information about the current user" returned, despite being connected still... EDIT: nevermind, it was an issue with getLoginStatus() having not returned yet, once I ran it again it worked. – Kevin Apr 16 '13 at 23:19
-
Or do a backend call. Graph API doc: https://developers.facebook.com/docs/facebook-login/permissions/v2.4#revokelogin – Doug S Aug 20 '15 at 03:28
0
I got this working with a serverside request using Using ASP.Net with Facebook’s Graph API and OAuth 2.0 Authentication this article as reference you get a auth token then when they redirect back to your callback you post a delete request to the graph url e.g.
"https://graph.facebook.com/person_id/permissions?access_token=token

John
- 3,512
- 2
- 36
- 53