How can I add comments on a particular youtube video via my app? Using youtube api v3. I am able to get the comments of a youtube video using this url:
http://gdata.youtube.com/feeds/api/videos/"+VIDEO_ID+"/comments?prettyprint=true
How can I post comments?
Jeet
You can use you tube "CommentThreads: insert" to post your comment via app
https://developers.google.com/youtube/v3/docs/commentThreads/insert
following is the api call
Post url : https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&key={YOUR_API_KEY}
And body for the API call is:
Body
{ "snippet":{
"topLevelComment":{
"snippet":{
"textOriginal": "YOUR_COMMENT_HERE",
"videoId": "VIDEO_ID"
}
}
}
}
Also add don't forget to add following scope https://www.googleapis.com/auth/youtube.force-ssl
来源:https://stackoverflow.com/questions/27792340/post-comments-to-youtube-videos-using-youtube-api-v3-android