可以通过 Instagram API 提取 Insights 数据吗?

Possible to pull Insights data via Instagram API?

Instagram 最近允许帐户 link 到 Facebook 商业页面。他们还添加了一个新的 'Insights' 部分,提供如下指标:

展示次数 抵达 热门帖子 按年龄划分的关注者

我找不到通过 API 获取这些新号码的方法。我需要申请单独的 Analytics API 吗?

面对这个问题(分析仅限于移动应用程序),我决定使用 Android 应用程序 SSL Packet Capture(不需要 root)来捕获请求(您必须手动获取a post 在录制时在应用程序中的见解)。正确的 GET 请求将列在其中一个 Instagram 条目中,而且它很长!

必要的访问令牌已嵌入到请求中,instagram post id 可以替换为获取 post 级分析:覆盖率、印象和参与度。此外,GET 请求 必须通过 https.

进行

请求(以 URL 解码形式)将如下所示:

https://graph.facebook.com/graphql?access_token=<ACCESS_TOKEN>&query_id=<QUERY_ID>&locale=en_US&strip_nulls=true&strip_defaults=true&querparams={"0":{"id":"<POST_ID>", "access_token":"<ACCESS_TOKEN_2>:{"_token_ver":2,"_auth_user_id":<USER_ID>,"_token":"<TOKEN>","asns":{"<ASNS>,"time":1476466064},"_auth_user_backend":"accounts.backends.CaseInsensitiveModelBackend","last_refreshed":1476396104.372065,"_platform":1,"_auth_user_hash":""}"}}'

这个问题的快速更新:Instagram 平台 API 现在提供 an endpoint for insights

端点

GET graph.facebook.com
    /{media_id}/insights?metric={engagement|impressions|reach|saved|video_views}

例子

GET graph.facebook.com
    /17895695668004550/insights?metric=impressions,reach

示例响应

{
  "data": [
    {
      "name": "impressions",
      "period": "lifetime",
      "values": [
        {
          "value": 264
        }
      ],
      "title": "Impressions",
      "description": "Total number of times the media object has been seen",
      "id": "17855590849148465/insights/impressions/lifetime"
    },
    {
      "name": "reach",
      "period": "lifetime",
      "values": [
        {
          "value": 103
        }
      ],
      "title": "Reach",
      "description": "Total number of unique accounts that have seen the media object",
      "id": "17855590849148465/insights/reach/lifetime"
    }
  ]
}