youtube api 评级不起作用?
string developerKey = "--------------------------";
string username = "[email protected]";
string password = "@@@@";//password
YouTubeRequestSettings settings = new YouTubeRequestSettings("Videoapp", null, developerKey, username, password);
YouTubeRequest request = new YouTubeRequest(settings);
Video newvid = new Video();
Uri asdf = new Uri("http://www.youtube.com/watch?v=07rQlP66f2k");
newvid.VideoId = "07rQlP66f2k";
newvid.Rating = 5;
//request.Insert(video.RatingsUri, video); should be like this from youtube api developers guide
request.Insert(asdf, newvid);
我做错了什么?谁能向我解释一下以及如何解决它?
string developerKey = "--------------------------";
string username = "[email protected]";
string password = "@@@@";//password
YouTubeRequestSettings settings = new YouTubeRequestSettings("Videoapp", null, developerKey, username, password);
YouTubeRequest request = new YouTubeRequest(settings);
Video newvid = new Video();
Uri asdf = new Uri("http://www.youtube.com/watch?v=07rQlP66f2k");
newvid.VideoId = "07rQlP66f2k";
newvid.Rating = 5;
//request.Insert(video.RatingsUri, video); should be like this from youtube api developers guide
request.Insert(asdf, newvid);
what am I doing wrong? Can anyone explain to me and how to do fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须先检索视频,然后可以使用以下代码添加评级:
另请注意,数字 gd: rating 已被弃用并由 yt: rating 元素取代:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_ ratings.html
You have to retrieve the video first and then you can use the following code to add a rating:
Please also note that the numeric gd:rating has been deprecated and replaced by the yt:rating element:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_ratings.html