PHP Youtube API - Getting Insight Data

倾然丶 夕夏残阳落幕 提交于 2019-12-12 10:19:15

问题


I am using the Zend PHP Gdata API for Youtube to retrieve data and upload video on Youtube and need to get Insight information for each video but confused how.

I have read on forums and random posts it comes through in the getVideoEntry if you are authenticated and you own the video (which I am / and the video is). I get the statistics object but I wanted the full insight data.

I have seen the following documentation but can't see how to get it using the API:

http://code.google.com/apis/youtube/2.0/developers_guide_protocol_insight.html

Thanks, James


回答1:


I finally got this working and got the insight zip file download in the feed when calling "getVideoFeed" with the URL: "http://gdata.youtube.com/feeds/api/users/default/uploads" make sure though you setMajorVersion(2) on the Youtube connection object.

Please note: After speaking to YouTube directly the Insight ZIP returns 7 days by default, although changing the user_starttime you can get a MAXIMUM of 28 days.

Hope this helps someone in the future!

James



来源:https://stackoverflow.com/questions/5299110/php-youtube-api-getting-insight-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!