Instagram Graph API-卷轴可用,但是格式是什么?

发布于 2025-02-13 07:43:29 字数 393 浏览 2 评论 0 原文

Facebook提到现在,他们现在可以使用/Insights端点来提供卷轴数据,yay(请参阅在这里)! 尽管文章说他们已经更新了文档,但我看不到该文档的格式,我们是否认为格式会这样?

insta_page_id/insights?metric=reels&period=lifetime

Facebook mentioned they're now making reels data available with the /insights endpoint, yay (see here )!
Although the article says they've updated their docs I don't see how it would be formatted, do we think the format will be like this?

insta_page_id/insights?metric=reels&period=lifetime

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡淡離愁欲言轉身 2025-02-20 07:43:30

对于Instagram中的Reels帖子,您可以在Meta Graph API Explorer中尝试以下查询(假设您有一个具有所需权限的应用程序):

[igpost-id]/Insights?metric = like = likes,评论,分享,戏剧,覆盖率,触及,触及,触及,触及,触及保存,total_interactions

上述查询应为您提供这些度量标准的响应。

目前,我没有找到任何媒体type作为“卷轴”。 Reels Media_type仍然标记为视频。唯一的方法是通过包含在其中。

For a reels post in Instagram, you can try the following query in the Meta Graph API explorer(Assuming you have an app with required permissions):

[IGpost-id]/insights?metric=likes, comments, shares, plays,reach,saved,total_interactions

The above query should give you a response for these metric.

Currently I did not find any media_type as "reels". A reels media_type is still tagged as Video. Only way to identify if a post is a reel is through the permalink url which contains https://www.instagram.com/**reel**/XXXXXXX in it.

https://developers.facebook.com/docs/instagram-api/reference/ig-media/insights/

美人迟暮 2025-02-20 07:43:30

多亏了 @kristiluna上面的评论,我能够解决一个类似的问题。

Instagram Reels仍然由Instagram Graph API识别为 Media_type:“ Video” 。说出feed视频和卷轴之间差异的方法是检查图API上的 Media_product_type 字段。

我的方法(通过Instagram用户的媒体循环):

fetch (`https://graph.facebook.com/v14.0/${ig-user-id}/media?fields=id,media_type,media_product_type`, {method: 'get'})
.then(response => response.json())
.then(data => {
  let dataObject = data.data
  dataObject.forEach((item, i) => {
    if (dataObject[i].media_type === "VIDEO" && dataObject[i].media_product_type === "REELS") {
      // do stuff 
    })
  }
}

Thanks to @KristiLuna's comment above I was able to solve a similar problem.

Instagram reels are still identified by the Instagram Graph API as media_type: "VIDEO". The way to tell the difference between a feed video and a reel is by checking the media_product_type field on the Graph API.

My approach (to loop through an Instagram user's media):

fetch (`https://graph.facebook.com/v14.0/${ig-user-id}/media?fields=id,media_type,media_product_type`, {method: 'get'})
.then(response => response.json())
.then(data => {
  let dataObject = data.data
  dataObject.forEach((item, i) => {
    if (dataObject[i].media_type === "VIDEO" && dataObject[i].media_product_type === "REELS") {
      // do stuff 
    })
  }
}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文