我正在使用评论:列表方法
要求
https://www.googleapis.com/youtube/v3/comments?part=snippet&parentId=ay4MKe1u7Ec&key=`{MY_KEY}`
我使用API获取评论返回此
{
"kind": "youtube#commentListResponse",
"etag": "\"xmg9xJZuZD438sF4hb-VcBBREXc/pGLBhpjR05yQoJV31WoAx2PEFVw\"",
"items": []
}
仅当您需要获取有关已经知道注释ID的注释的其他信息时,或者在您要获取有关答复的注释的更多详细信息的URL的情况下,才使用comment-> list方法。一个parentID。换句话说,您不能将videoID放入comment-> list方法中。
您需要的是commentThreads-> list端点:
https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&videoId=ay4MKe1u7Ec&key={YOUR_API_KEY}
这将为您提供所有带有其ID的注释...您可以获取这些ID,然后通过comment-> list端点运行它们以获取更多的详细信息。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句