php - Youtube API returns video views number always the same -
i'm using google youtube api ver2 video data, works got same views number "12180171" videos !
$data=@file_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 example : -0_jism5_ea
actually faced same problem since yesterday, , discovered google has stopped gdata api (ver 2.0), can check below link
http://youtube-eng.blogspot.com/2015/04/bye-bye-youtube-data-api-v2.html
you can check post on stackoverflow it's pretty useful, doesn't solve entire problem still appreciated effort
Comments
Post a Comment