【问题标题】:Can't create replies to some existing youtube comments无法创建对某些现有 youtube 评论的回复
【发布时间】:2015-11-20 03:21:53
【问题描述】:

我有一个软件,可让您创建对 youtube 视频评论的回复。因此我使用 youtube API v3 comments.insert 方法。

POST https://www.googleapis.com/youtube/v3/comments?part=id%2Csnippet&access_token=[access_token] { "snippet": { "parentId": "parentId", "textOriginal": "test message" } }

大多数时候请求都是成功的。但是对于某些 cmets,我无法以这种方式创建回复。 API 总是返回:

{ "error": { "errors": [ { "domain": "youtube.comment", "reason": "processingFailure", "message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid.", "locationType": "other", "location": "body" } ], "code": 400, "message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid. Check the structure of the <code>comment</code> resource in the request body to ensure that it is valid." } }

我正在使用有效的访问令牌,并且 parentId 也是有效的,因为我可以通过 API 检索它。 我查看了成功和失败的请求,但没有发现任何区别。所以我假设请求输入并不像错误消息中提到的那样无效。 在我看来,这个错误不是暂时的错误,因为同样的请求在几天后仍然失败。

我也尝试通过 API Explorer 对此类评论创建回复,但结果相同。

有人有同样的问题还是我做错了什么?

【问题讨论】:

  • 您能否举一个您无法为其创建回复的 cmets 的示例?当然,还有视频 ID。每次尝试回复时,您都在请求正文中使用类似的评论资源结构,对吧?
  • 是的,我失败的 POST 回复请求的结构始终与成功的请求相同。例如,我无法在此视频 id "Xq7k5Ti2mGA" 上创建对此评论 id "z13rgftjgw3bulyou04ccfnbjofztxg54yo0k" 的回复”。既不通过我的软件的 API 请求,也不直接通过 API Explorer。
  • 当我使用 CommentThreads.list 调用来获取有关该评论 (https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&amp;id=z13rgftjgw3bulyou04ccfnbjofztxg54yo0k&amp;key=[API_KEY_HERE]) 的更多信息时,它会在项目部分显示 "canReply": false。它会给你processingFailure 错误而不是operationNotSupported error,这似乎很不寻常。
  • 那将是预期的错误是的。你知道为什么我无法在视频中插入对某些 cmets 的回复,而它适用于其他人。在同一视频 (Xq7k5Ti2mGA) 上为该评论 ID“z13tjxdqnuygy1lga04cilcqxqipg1zbtbs”创建回复将使用视频所有者的访问令牌。这是个人用户设置吗?当错误消息不可靠时,您是否知道此问题的任何解决方法?
  • 看视频的时候,ID为z13tjxdqnuygy1lga04cilcqxqipg1zbtbs的评论下面有一个“回复”选项,而ID为z13rgftjgw3bulyou04ccfnbjofztxg54yo0k的评论没有。用户可能通过他们的 Google+ 信息页发布了评论并禁用了对其帖子的回复。

标签: api youtube youtube-api youtube-data-api


【解决方案1】:

当我去看视频直接看cmet时,ID为z13tjxdqnuygy1lga04cilcqxqipg1zbtbs的评论下方有一个“回复”选项,而ID为z13rgftjgw3bulyou04ccfnbjofztxg54yo0k的评论则没有。用户似乎通过他们的 Google+ 页面发布了评论并禁用了对其帖子的回复。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-11
    • 2016-05-29
    • 2015-10-21
    • 2016-11-19
    • 2020-06-26
    • 2016-08-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多