[英]Automatically subscribe pages to messenger webhook
I am working on a messenger platform that uses a messenger webhook to receive messages, and the Graph API to send messages.我正在开发一个使用 messenger webhook 接收消息的 messenger 平台,并使用 Graph API 发送消息。 I currently need to go into my app settings and choose to subscribe pages that I already own.我目前需要 go 进入我的应用程序设置并选择订阅我已经拥有的页面。
I am wondering how I can subscribe pages that I don't own to my webhook.我想知道如何将我不拥有的页面订阅到我的 webhook。 Is this possible if I have the Page Access Token?如果我有页面访问令牌,这可能吗? I can build an OAuth2 flow to get the Page Access Token, but I don't see what to do with it once I have it.我可以构建一个 OAuth2 流程来获取页面访问令牌,但是一旦有了它,我就不知道该怎么处理它。
Any help is appreciated.任何帮助表示赞赏。
This can be achieved by making a POST call to /{page-id}/subscribed_apps
endpoint with your Page Access Token.这可以通过使用您的页面访问令牌对/{page-id}/subscribed_apps
端点进行 POST 调用来实现。
API reference docs are at https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps/ API 参考文档位于https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.