You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Instagram帖子URL获取对应Facebook媒体ID?

获取Instagram帖子对应的Facebook Graph Insights关联媒体ID

Alright, let's break this down clearly. You're right that using endpoints like https://api.instagram.com/oembed/?callback=&url=[你的Instagram帖子链接] or appending ?__a=1 to the post URL gives you an Instagram-native media ID—but this isn't the one that links up with Facebook's Instagram Graph Insights.

Since you already have the required Facebook resources (like a linked Instagram Business account and proper API permissions), here's how to get the correct associated Facebook media ID:

  • First, confirm your setup
    Make sure your Instagram account is a Business or Creator account and is linked to a Facebook Page. This is mandatory for accessing the cross-platform media IDs via the Graph API.

  • Use the Facebook Graph API to fetch the linked ID
    You have two straightforward ways to do this:

    1. List all media for your Instagram Business account
      Call this endpoint (replace the placeholders with your actual IDs and valid access token):
      GET /{instagram-business-account-id}/media?fields=id,facebook_id
      
      The facebook_id field in the response is exactly the media ID you need for Graph Insights.
    2. Target a specific Instagram post directly
      First, grab the Instagram-native media ID using your existing method, then call:
      GET /{instagram-native-media-id}?fields=facebook_id
      
      This will return just the associated Facebook media ID for that specific post.

Important notes: You'll need the right permissions (like instagram_basic, pages_show_list) and a valid access token (preferably a Page access token) to make these API calls successfully.

内容的提问来源于stack exchange,提问作者Alex Harris

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 08:11:33