从Facebook API获取视频查看次数

时间:2016-11-11 19:18:34

标签: facebook facebook-graph-api facebook-apps facebook-ads-api facebook-marketing-api

我试图弄清楚哪个(如果有的话)API会允许我访问视频观看次数(给定Facebook视频的观看次数)。我查看了Atlas,Graph和Marketing API的文档,但我似乎无法找到任何会返回此指标的API调用。

在几个月前出现围绕指标真实性的问题后,这是否会脱离API?

1 个答案:

答案 0 :(得分:0)

只需对包含视频的帖子提出见解请求即可。有许多指标,都记录在案here

您还需要足够的页面权限;你不能看别人的帖子的见解(因此下面的例子将返回空数据)。

例如127615610597242_1608135349211920/insights/post_video_views

示例输出:

{
  "data": [
    {
      "name": "post_video_views",
      "period": "day",
      "values": [
        {
          "value": 1111,
          "end_time": "2016-11-24T08:00:00+0000"
        },
        {
          "value": 2222,
          "end_time": "2016-11-25T08:00:00+0000"
        },
        {
          "value": 3333,
          "end_time": "2016-11-26T08:00:00+0000"
        }
      ],
      "title": "Daily Total Video Views",
      "description": "Daily: Total number of times your video was viewed     for more than 3 seconds. (Total Count)",
      "id":     "127615610597242_1608135349211920/insights/post_video_views/day"
    },
    {
      "name": "post_video_views",
      "period": "lifetime",
      "values": [
        {
          "value": 44444
        }
      ],
      "title": "Lifetime Total Video Views",
      "description": "Lifetime: Total number of times your video was     viewed for more than 3 seconds. (Total Count)",
      "id":     "127615610597242_1608135349211920/insights/post_video_views/lifetime"
    }
  ]
}