本文介绍了什么办法评价自己使用谷歌的任何或YouTube API在YouTube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题所困扰,通过Android应用率的YouTube视频。我使用谷歌客户端API,YouTube API取得,谷歌播放服务。所以,我能够使用的AccountManager执行 OAuth2.0的 authenication。并且还能够将视频上传到YouTube上。但我没有找到AY链接评级YouTube视频。是那里的做同样的任何链接或教程或样品?

I am struggling with a problem to rate an youtube video through an android app. I am using google-client-api,youtube api, google play services. So i am able to perform OAuth2.0 authenication using AccountManager. and also able to upload video on youtube. but i didnt find ay link for rating a youtube video. is there any link or tutorial or sample for the doing the same?

推荐答案

这可以很容易地通过YouTubeAPI V2.0完成。请参阅该规范

This can be easily done by using YouTubeAPI v2.0. See the specification on this link

POST /feeds/api/videos/VIDEO_ID/ratings
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
       xmlns:gd="http://schemas.google.com/g/2005">
  <gd:rating value="4" min="1" max="5"/>
</entry>

这篇关于什么办法评价自己使用谷歌的任何或YouTube API在YouTube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:53