为什么Instagram Graph API Webhook不起作用 [英] Why is the Instagram Graph API webhook not working

查看:225
本文介绍了为什么Instagram Graph API Webhook不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当另一个用户在另一个/我的媒体上发表评论(带有提及)时,我无法接到网络挂断电话.

I am not able to get webhook calls when another user post a comment (with mentions) on another/my media.

仅出于测试目的,我为Webhook端点设置了一个ngrok服务器,该服务器始终以200回答并处理验证.在进行繁重的编码之前,我只想查看Instagram的webhook工作流程是否正常运行.

Just for testing purposes I set up a ngrok server for my webhook endpoint, which always answers with a 200 and handles the verfication. Before the heavy coding I just wanted to see if the webhook workflow for Instagram is generally working.

我创建了一个Facebook应用程序,一个Instagram商业帐户,一个Facebook页面,并将页面与Instagram商业帐户链接.使用 Instagram的Webhooks 中的信息,我创建了一个页面访问令牌Graph API Explorer.当我使用访问令牌调试器调试令牌时,一切看起来都很好.此处包含所有必需的权限,例如manage_pages,pages_show_list,instagram_basic,instagram_manage_comments,instagram_manage_insights,public_profile.使用页面访问令牌,我可以通过Graph API Explorer获取有关链接的Instagram商业帐户的所有信息.

I created a Facebook app, an Instagram business account, a Facebook page and linked the page with the Instagram business account. With the information at Webhooks for Instagram I created a page access token with the Graph API Explorer. When I debug the token with the Access Token Debugger, everything looks fine. All needed permissions like manage_pages, pages_show_list, instagram_basic, instagram_manage_comments, instagram_manage_insights, public_profile are there. With the page access token I am able to fetch all informations regarding my linked Instagram business account via the Graph API Explorer.

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

Also the Instagram product was automatically added to my Facebook app. Test requests, which where send via the app dashboard (Webhooks product), will be received by my ngrok server. But any type of mentions or comments from another or my Instagram account (business or not) on my or other medias will not be received. What am I doing wrong? Do I have to send those comments/mentions from a specific account, since the app is in development mode and there roles in the app?

推荐答案

在与Facebook支持人员交谈后,我的困惑已解决. 问题在于,Instagram产品的Webhook必须经过经过验证的应用程序审查才能运行.我一直想知道如何在不运行webhooks的情况下使用正在运行的解决方案来录制截屏视频……最重要的是,我想知道为什么开发人员模式下的webhooks可以用于产品Messenger,而不能用于instagram(或其他).显然,应用程序审查与技术实施无关,而是与检查实施是否符合Facebook准则有关.为此,我想引用Facebook支持:

After speaking with the Facebook support, my confusion has been resolved. The problem is that the Webhook for the Instagram product does not work without a verified app review. I had been wondering how to record a screencast with my running solution, without running webhooks... Above all, I had wondered why the webhooks in dev mode worked for the product messenger but not for instagram (or others). Apparently, the app review is not about the technical implementation but rather about checking that the implementation complies with the facebook guidelines. Therefor I want to quote the Facebook support:

Messenger确实允许页面所有者和应用程序管理员通过devmode接收Webhooks,以实现其实现.但是,这对于instagram或专页而言并不相同.这就是产品团队决定实施它的方式.为了进行应用审查,您可以使用测试Webhook或您自己的流程来显示流程的模拟流程.该应用程序审查与技术实施步骤无关,而只是一种确保您的应用程序将按照我们的指南使用许可的方式,因此模拟该过程应该很好.审阅者了解到,您在开发人员模式下不会收到Webhook,因此应考虑到这一点.

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.

因此,我现在必须提交一个应用程序审查,并且为此,我必须模仿网络挂钩.

Consequently, I will now have to submit an app review and for that I have to imitate the webhook.

这篇关于为什么Instagram Graph API Webhook不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆