views:

120

answers:

1

I'm in the final stages of converting our site over to Graph API from the Rest API.

The last piece I'm missing is the old "revokeApplication" call used for when a user chooses to "remove connection" from our site.

Despite my desires to completely remove the Rest API, I thought I might just fire it up for this, but it requires a session key -- something no longer stored in the Graph API.

Anybody have any ideas?

+1  A: 

I figured it out. I'll leave it here for those that need to know...

The old rest api (including the revokeApplication api) can still be accessed, now with the new OAuth access_token. Just use this url: https://api.facebook.com/method/METHODNAME

For this particular call, it's a POST:

$ch = curl_init();
curl_setopt($ch, CURLOPT_POSTFIELDS, 'access_token='.$users_access_token);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, 'https://api.facebook.com/method/auth.revokeAuthorization');
$output = curl_exec($ch);
curl_close($ch);

More info here: http://developers.facebook.com/docs/reference/rest/

jmccartie

related questions