使用Facebook API获取视频观看次数 [英] Getting a video views with Facebook API
问题描述
我想获取页面上视频的视频计数,但是我能获得的所有信息都是有关交叉发布的视频的信息,但是我的视频没有交叉发布.
I want to get the video count of the videos on my pages but all the informations I can get are informations about crossposted videos but my videos are not crossposted.
我在没有解决方案的情况下与Graph API Explorer一起玩了很多.
I played with the Graph API explorer quite a bit without arriving to a solution.
/{pages_id_video_id}/insights/post_video_views
我尝试的所有操作都只给了我一个空的数据"数组.
And everything I tried only gave me an empty "data" array.
推荐答案
首先,请确保您拥有具有read_insights
权限的令牌!
您可以在此处检查令牌: https://developers.facebook.com/tools/debug/accesstoken/
First please be sure you have a token with read_insights
permission !
You can check your token here: https://developers.facebook.com/tools/debug/accesstoken/
您可以在此处浏览Facebook API: https://developers.facebook.com/tools/explorer
You can explore the Facebook API here: https://developers.facebook.com/tools/explorer
您可以通过以下请求获得有关页面的所有视频见解
You can get all your videos insight for a page with this request:
/PAGE_ID/videos?fields=video_insights
如果您只想了解一部视频的见解,请使用此请求:
If you want only insights for one video use this request:
/VIDEO_ID/video_insights/total_video_views/lifetime
您可以更改时间段(可接受的值为 {day,week,days_28,month,lifetime,total_over_range} )以及您想要的信息(total_video_views_unique,total_video_views_autoplayed,total_video_views_clicked_to_play ... )列出页面中所有视频的第一个请求将为您提供所有的可能性;)
You can change period (accepted values are {day, week, days_28, month, lifetime, total_over_range}) and what you information you want (total_video_views_unique, total_video_views_autoplayed, total_video_views_clicked_to_play ...) the first request listing all videos from a page will give you all the possibility ;)
这篇关于使用Facebook API获取视频观看次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!