I have a Facebook App which is subscribed to more than 20,000 pages. The server isn't able to process hooks from all these Facebook pages, I want to unsubscribe my app from all these Facebook pages. Is there a quicker way to do this. Most of the page access token I have is expired, so I can't loop through all the pages and unsubscribe my app from them.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To unsubscribe your app from a Facebook page, you do not need a token from the page. All you need is your App Access Token. To unsubscribe from the page just make a DELETE http request to:
https://graph.facebook.com/{page_id}/subscribed_apps?access_token={your_access_token}
You can get your App Access Token by sending a GET request to:
https://graph.facebook.com/oauth/access_token
?client_id={app-id}
&client_secret={app-secret}
&grant_type=client_credentials
So just make a DELETE request to each page you want to unsubscribe from.