How to recognize on PHP that Facebook App was uninstalled

此生再无相见时 提交于 2019-12-24 02:01:51

问题


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 POSTs 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!