如何让用户订阅者计算Youtube API v3

时间:2017-03-05 17:42:40

标签: php youtube-api

对于我发送的频道:

$videoInfo = $youtube->channels->listChannels('statistics,snippet',array(
    'id'=> $chanelId
));

但是如何让订阅者为用户服务呢?例如对于https://www.youtube.com/user/WarnerBrosPictures

1 个答案:

答案 0 :(得分:1)

查看listChannels方法的示例输出:

{
  ...
  "statistics": {
    "viewCount": unsigned long,
    "commentCount": unsigned long,
    "subscriberCount": unsigned long,
    "hiddenSubscriberCount": boolean,
    "videoCount": unsigned long
  },
  ...
}

您已有数据,请var_dump($videoInfo);查看这些详细信息。