How to Unsubscribe an app for all Facebook pages Webhooks

纵然是瞬间 提交于 2019-12-24 09:37:44

问题


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

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