Possible Duplicate:
Facebook API SDK revoke access
Can anyone provide a code snippet to de-authorize (or revoke the access token for) my canvas app with the JS SDK?
I've tried numerous things by following the links in this related question, but the Documentation is confusing, and I keep recieving error messages.
My current code:
$('#deAuth_button').click( function(){
var user_id = ____user_id____,
ap_id = ____app_id____,
req_id = ap_id + '_' + user_id;
FB.api(req_id, 'delete', function(response) {
console.log(response);
// error (#200) The user hasn't authorized the application to perform this action
});
});
Relevant Links: