我使用Google YouTube API Ver2獲取視頻數據,一切正常,但我對所有視頻都獲得了相同的視圖編號「12180171」!Youtube API返回的視頻觀看次數總是相同的
[email protected]_get_contents('http://gdata.youtube.com/feeds/api/videos/'.$video_id.'?v=2&alt=jsonc');
$obj=json_decode($data);
$video_data['views'] = number_format($obj->data->viewCount, 0, ',', ',');
VIDEO_ID例如:-0_JiSm5_EA