Instagram Mention API-无法在DEV模式下检索媒体详细信息 [英] Instagram Mention API - not able to retrieve media details in DEV mode

查看:72
本文介绍了Instagram Mention API-无法在DEV模式下检索媒体详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于不赞成使用现有的instagram API,因此我将切换到图api. 以下是我要实现的目标以及问题所在.

Since the existing instagram APIs are deprecated, I am switching to the graph api. Below is what i want to achieve and what the issue is.

要求.

  1. 我想跟踪使用@提及我的企业帐户的instagram帖子的喜​​欢和评论的数量.我已经设置了faccebook和instagram帐户以及网络挂钩. Webhook将向我发送"mediaid",其中标记了我的公司帐户.

由于该应用程序处于开发模式,因此如果我在任何帖子中都提到该企业帐户,我都不会收到Webhooks,但是我能够从开发者帐户控制台发送测试Webhook.因此,我认为一旦该应用程序处于LIVE模式,它将开始将webhooks发送到我的服务器.

Since the app is in the development mode i am not receiving the webhooks if i mention the business account in any of the post, but i am able to send the test webhook from the developer account console. So i assume once the app is in LIVE mode it will start sending the webhooks to my server.

  1. 一旦收到"mediaid",我想拨打另一个api
  1. Once the "mediaid" is received i would like to make a call to another api https://developers.facebook.com/docs/instagram-api/reference/user/mentioned_media in order to get the number of likes and comments.

我在第二部分面临一个问题.每当我调用第二部分中提到的api时,我都会得到错误

I am facing an issue on the 2nd part. Whenever i call the api mentioned in the 2nd part i am getting the error

当我传递我的instagram企业帐户所拥有的mediaid时,此api调用可以正常工作.但是,一旦我通过提到我的业务的帖子的媒体ID,就会收到上述错误.

This api call works fine when i pass the mediaid that my instagram business account owns. But as soon as i pass the mediaid of the post which mentioned my business i am getting the above error.

我只是想检查这是否也是我的Facebook应用处于开发模式的限制?请提出解决方案以实现此方案.

I just wanted to check if this is also a limitation of my facebook app being in a development mode ? Please suggest a solution to achieve this scenario.

推荐答案

我尝试了与您所做的相同的操作,但是使用了实时Facebook应用程序.从网络挂钩中,我收到一个事件,当任何其他用户在标题中提及我的instagram业务句柄并能够使用提到的媒体API https://developers.facebook.com/docs/instagram-api/reference/user/提及的媒体.

I tried the same what you did but with a live facebook app. From the webhook, I got an event when any other user mentioned my instagram business handle in caption and am able to fetch the mentioned media details using the mentioned media API https://developers.facebook.com/docs/instagram-api/reference/user/mentioned_media.

由于您没有共享webhook事件有效负载,因此我假设您在进行API调用时使用了正确的用户ID.事件有效负载中用户ID的JSON路径为entry [0] .id

As you didn't share the webhook event payload, I am just assuming you are using the correct user id while making the API call. The JSON path of the user id in event payload is entry[0].id

这篇关于Instagram Mention API-无法在DEV模式下检索媒体详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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