views:

146

answers:

3

I can't find any documentation in the new Facebook Graph/Authorization API documentation about how to handle post-remove callbacks from the Facebook server.

With the REST API, this page described how to handle this.

Any ideas on how to do this with the new PHP SDK? Do we need to do the signature verification ourselves? What's the equivalent for fb_params in the new Graph API?

Any ideas that you can share are appreciated.

A: 

There is an option in your app settings where you can enter in a URL that you would like Facebook to ping when a user removes your app. You can access it through the Facebook Developer app -> Edit Settings -> Authentication tab.

Facebook will send this URL a POST request with the parameters described in the link you provided. Looking at the new php-sdk, there's no convenient function to verify the authenticity of the POST request for you. You have to do the signature verification yourself also described in the link you provided.

jcmoney
that's an answer to something else, not to my question above.
psychotik
Isn't your question on how to handle the case that a user removes your app? I'll edit my response to be more complete though.
jcmoney
A: 

The one answer I have got about old API functions with the new API from Facebook was just to use the new PHP library to call the old api. Here is an example of such a call.

$fb->api(array(
    'method' => 'events.invite',
    'eid' => $event_id,
    'uids' => $id_array,
    'personal_message' => $message,
));

Hope that at least provides some direction for you. It would be where I would go if the new API doesn't support something. Though I have also had luck guessing some calls with the new API and getting what I need if it is very similar to something that is documented in the new API.

gokujou
A: 

Maybe this can help you:

http://developers.facebook.com/docs/authentication/canvas

You need to do the signature verification yourself. Sorry :)

Coquevas