问题
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.
来源:https://stackoverflow.com/questions/47865756/how-to-unsubscribe-an-app-for-all-facebook-pages-webhooks