facebook - 为什么 Instagram Graph API webhook 不起作用

标签 facebook instagram webhooks instagram-graph-api facebook-webhooks

当另一个用户在另一个/我的媒体上发表评论(提及)时,我无法收到网络钩子(Hook)调用。

出于测试目的,我为我的 webhook 端点设置了一个 ngrok 服务器,它总是以 200 应答并处理验证。在进行繁重的编码之前,我只是想看看 Instagram 的 webhook 工作流是否正常工作。

我创建了一个 Facebook 应用程序、一个 Instagram 商业帐户、一个 Facebook 页面,并将该页面与 Instagram 商业帐户相关联。信息在 Webhooks for Instagram我使用 Graph API Explorer 创建了一个页面访问 token 。当我使用访问 token 调试器调试 token 时,一切看起来都很好。所有需要的权限,如 manage_pages、pages_show_list、instagram_basic、instagram_manage_comments、instagram_manage_insights、public_profile 都在那里。使用页面访问 token ,我可以通过 Graph API Explorer 获取有关我关联的 Instagram 企业帐户的所有信息。

Instagram 产品也自动添加到我的 Facebook 应用程序中。通过应用仪表板(Webhooks 产品)发送的测试请求将由我的 ngrok 服务器接收。但是,我或其他媒体上的其他人或我的 Instagram 帐户(无论是否为公司)的任何类型的提及或评论都不会收到。我究竟做错了什么?我是否必须从特定帐户发送这些评论/提及,因为该应用程序处于开发模式并且应用程序中有角色?

最佳答案

在与 Facebook 支持交谈后,我的困惑得到了解决。 问题是 Instagram 产品的 Webhook 在没有经过验证的应用程序审查的情况下无法工作。我一直想知道如何在不运行 webhooks 的情况下使用我正在运行的解决方案录制截屏视频……最重要的是,我想知道为什么开发模式下的 webhooks 适用于产品 Messenger 但不适用于 instagram(或其他)。显然,应用审查不是关于技术实现,而是关于检查实现是否符合 facebook 指南。因此,我想引用 Facebook 的支持:

Messenger does allow page owners and app admins to receive webhooks for their implementations in devmode and is by design. However, this is not the same for instagram or pages. This is just how the product teams have decided to implement it. For app review, you can show a mock process of the flow, using either the test webhook or your own process. The app review is less about technical implementation steps, but just a way to make sure that your app is going to use the permission in a way that follows our guidelines, so mocking the procedure should be fine. The reviewers understand that you do not receive webhooks in dev mode and should take this into consideration.

因此,我现在必须提交应用评论,为此我必须模仿 webhook。

关于facebook - 为什么 Instagram Graph API webhook 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58545332/

相关文章:

javascript - Instafeed.js 不在页面上显示图像

git - Taiga+GitLab 集成 : only enable for master branch?

javascript - 从 Typeforms webhook 解析原始正文时出现问题

ios - Swift:截取 viewController 的屏幕截图并在 Facebook 上分享

javascript - 在 Gmail 或 Facebook 等网站上使用 jQuery

android - instagram android 是如何实现导航的?

ios - 输入类型 ='file' 在 Instagram 应用内浏览器中不起作用

GitHub : I am missing "Settings" menu on the landing page of my repo

ios - 如何在 AppDelegate 中使用 Parse 正确设置 Facebook iOS SDK?

javascript - Vue.js,嵌入式 facebook 视频未显示