如何从Android中的YouTube视频播放器获取YouTube视频观看次数

时间:2016-09-28 19:07:37

标签: android android-youtube-api

我如何获得总视频观看次数&喜欢来自youtube播放器api的youtube视频在android?

1 个答案:

答案 0 :(得分:1)

When you see the JSON, Under the statistics part you have viewCount.

which gives you the number of views. 

"items": [
  {
   "kind": "youtube#video",
   "etag": etag,
   "id": string,
   "statistics": {
    "viewCount": unsigned long,
    "likeCount": unsigned long,
    "dislikeCount": unsigned long,
    "favoriteCount": unsigned long,
    "commentCount": unsigned long
   }
  }
]

Hope it helps