私はAndroidアプリをやっていて、ユーザーがYoutubeアカウントでOAuth 2.0で認証できるようにしました。しかし、評価するのに適切な URL であるビデオを評価しようとすると、.
次の文字列を含む POST リクエストを送信します:
https://gdata.youtube.com/feeds/api/videos/sxbHyiwYDiw/ratings?value=like&key=my_access_token&v=2
次の応答が返されます: " Response contains no content type
"
編集:
このリンクを使用して確認します: http://gdata.youtube.com/demo/index.html
このアクションは、次の POST URL を送信して実行できます: " https://gdata.youtube.com/feeds/api/videos/sxbHyiwYDiw/ratings "
このヘッダーを追加する
httppost.setHeader("POST", "/feeds/api/videos/sxbHyiwYDiw/ratings");
httppost.setHeader("GData-Version", "2");
httppost.setHeader("X-GData-Key", "key=*********");
httppost.setHeader("Authorization", "AuthSub token=" + getAccessToken());
httppost.setHeader("Content-Type", "application/atom+xml");
...そして xml 本文を追加する
最初のリンク: Youtube Demo で確認できます。