【问题标题】:Rate comment, that was written by other user using YouTube api?评价由其他用户使用 YouTube api 编写的评论?
【发布时间】:2017-01-06 13:39:04
【问题描述】:
def update_comment(youtube, comment):
  comment['snippet']['viewerRating'] = 'like'
  comment['snippet']['textOriginal'] = 'some text' # Note this is important parameter
  update_result = youtube.comments().update(
    part='snippet',
    body=comment
  ).execute()

如果这条评论是我的,这段代码只是更新评论和评分。

但是,如果我想评价另一个评论,就会发生 Http Error 400。

因此,它能够/可能对其他用户撰写的评论进行评分。

【问题讨论】:

    标签: youtube-api youtube-data-api


    【解决方案1】:

    好吧,根据 this 等其他 SO 问题,评论的评级只能在您自己的评论中完成,而不是为其他用户。

    如果您还检查了CommentsCommentThreads 的文档,这里没有办法实现您喜欢的。

    我建议您经常查看 YouTube API 的 Revision History,以了解您可以使用它执行的最新功能。

    更多信息,请查看SO question

    【讨论】:

      猜你喜欢
      • 2019-04-15
      • 2016-09-05
      • 1970-01-01
      • 2018-11-06
      • 2016-03-24
      • 2011-03-03
      • 2016-09-11
      • 2013-05-26
      • 2016-05-29
      相关资源
      最近更新 更多