Post comments to youtube videos using youtube api v3 Android

后端 未结 1 1073
春和景丽
春和景丽 2021-01-15 16:43

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.

相关标签:
1条回答
  • 2021-01-15 17:24
    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

    0 讨论(0)
提交回复
热议问题