4

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

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.

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.

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?

aoez
  • 301
  • 3
  • 15
  • Yes, in dev mode this will only work for actions taken by users that have a role in the app. You will need to get your app reviewed and put it into live mode, before it will work for anyone else. – 04FS Oct 25 '19 at 06:25
  • @04FS thanks for the response. I suspected that, but I don't know from which Instagram account the action should be triggered? Currently in my app roles only the admin (my Facebook account) is registered. I signed up at Instagram via Facebook and with the same email address. Do I need another Instagram account which was signed via Facebook and the other Facebook account to my roles? – aoez Oct 25 '19 at 08:12
  • Did you connect your Facebook page to your IG Business or Creator account, and install the app on it as required? Guess if that same IG account simply posted a comment itself, it should work. – 04FS Oct 25 '19 at 08:29
  • My Facebook page is connected with my Instagram Business Account and I am able to fetch all Instagram account information via the Graph API Explorer with my page access token. Also my app with the webhooks product integration is shown at Settings/Business Integrations at Facebook. When I comment on one of my own images, no webhook call will be received at my ngrok endpoint... – aoez Oct 25 '19 at 08:49
  • @aoez hey there, did you ever get approval here, and if so do you remember how? – Diego Ponciano Oct 04 '22 at 17:33
  • 1
    @DiegoPonciano Hi! Unfortunately, that was a long time ago. So long that I even don't work in the Instagram integration team anymore. Accordingly, I can't remember a lot of things very well. What I can say is that we were approved at that time and also have first customers using our integration. In the end, we had to deal with the Facebook App Review Support. So explaining to them step by step how they can test our integration. That was very exhausting... – aoez Oct 12 '22 at 09:45

1 Answers1

6

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 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.

aoez
  • 301
  • 3
  • 15
  • Hi, I saw your answer in fb support, after you made mocking they answered you that your implementation is not correct with live webhook updates, have you succeeded with problem? – Jakhongir Nov 19 '19 at 13:49
  • No we still made no progress regarding this problem. It's hard to implement the whole process without webhooks but at least we can send and get data to/from the graph api. Also someone will not pass the review with just mocked screencasts. You actually have to develop a "running" application which is testable by FB. – aoez Nov 22 '19 at 08:26
  • We decided to mock our featuer with test updates on webhook. When receiving test update on our webhook we will get data from Graph Api and implement feature we need, than we'll send request for app approving. Hope that json that will come from live update won't differ from what comes now as test update – Jakhongir Nov 22 '19 at 14:28
  • 1
    @Jakhongir That's a valid approach you have to do until you don't have the approved app review – aoez Nov 22 '19 at 15:24
  • I am running into the same problem. I tried to use the test payload from the dashboard test but it appears the node for the comment my page is mentioned in does not exist when I query the graph API. Do you have an example request you used? Thanks! – Zach Jul 20 '20 at 22:12
  • Im not sure if page mentioning is even possible if you page is mentioned on another page, since you don't have a page token for that other page. – aoez Jul 28 '20 at 08:58
  • Hi aoez, thanks for your answer here. This helped me figure out why message were working but not mentions. Considering you don't need any permissions from user for this, can you give some insight on how your app review submission looked like? – stick Jan 12 '23 at 02:12
  • 1
    @stick Unfortunately, that was a very long time ago. I am no longer on the team that deals with the IG integration. What I do remember is that we had provided an endpoint in our application just for the review process that was expecting a URL to an IG post. The application had then scraped all the data for that post and sent it to our system as a fake webhook. Then we had an extremely detailed step-by-step description how to now call this endpoint from our system so that the app reviewers can test this fake webhook process and see how we will be integrating IG into our system. Hope that helps – aoez Jan 20 '23 at 12:15