0
对于通道我送:如何获取用户的用户数的Youtube API V3
$videoInfo = $youtube->channels->listChannels('statistics,snippet',array(
'id'=> $chanelId
));
但是如何获得用户计数的用户?例如为https://www.youtube.com/user/WarnerBrosPictures?
对于通道我送:如何获取用户的用户数的Youtube API V3
$videoInfo = $youtube->channels->listChannels('statistics,snippet',array(
'id'=> $chanelId
));
但是如何获得用户计数的用户?例如为https://www.youtube.com/user/WarnerBrosPictures?
看listChannels
方法的例子输出:
{
...
"statistics": {
"viewCount": unsigned long,
"commentCount": unsigned long,
"subscriberCount": unsigned long,
"hiddenSubscriberCount": boolean,
"videoCount": unsigned long
},
...
}
您已经在数据,做var_dump($videoInfo);
看到这些细节。
此方法不适用于用户,它仅适用于频道。 –
实际上,任何用户的Feed都有频道ID。对于华纳兄弟channelID等于'UCjmJDM5pRKbUlVIzDYYWb6g'。 –
对于使用频道传统名称(假设它们有一个),将“id”替换为“forUsername”。 – Tempus