问题
I am developing the application by Facebook PHP SDK. If a user uninstalls this application from the Facebook page, I'm going to delete related data from my app. Is there any way of recognizing uninstallation of an application by PHP?
回答1:
From the docs on authentication:
App Deauthorization
When a user of your app removes it in the App Dashboard or blocks the app in the News Feed, your app can be notified by specifying a Deauthorize Callback URL in the Developer App. During app removal we will send an HTTP POST request containing a single parameter, signed_request, which contains the user id (UID) of the user that just removed your app. You will not receive an user access token in this request and all existing user access tokens will be automatically expired.
回答2:
You can access updates about your app using Facebook Realtime Updates. These are webhooks - urls you provide on your server - which facebook POST
s information to when various actions happen, such as the user uninstalling your app.
来源:https://stackoverflow.com/questions/9391375/how-to-recognize-on-php-that-facebook-app-was-uninstalled