文档中心 > API类目 > 淘宝直播API

taobao.live.comments.publish (发布评论api)

同步微博发布过来的评论

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_top_topic_comment_request TopTopicCommentRequest 可选 发布评论的参数
  • └ avatar
  • String
  • 可选
  • http://XXXXX
  • 用户头像
  • └ content
  • String
  • 必须
  • 我来了
  • 评论内容
  • └ login_id
  • Number
  • 必须
  • 1233
  • 发布评论的用户ID
  • └ nick
  • String
  • 必须
  • 名称
  • 发布评论的名称
  • └ topic
  • String
  • 必须
  • 2wweerrrrrr
  • 直播间topicID 32位UUID

响应参数

名称 类型 示例值 描述
error_msg String 正确 错误原因
status Number 200 200是正确的

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LiveCommentsPublishRequest req = new LiveCommentsPublishRequest();
LiveCommentsPublishRequest.TopTopicCommentRequest obj1 = new LiveCommentsPublishRequest.TopTopicCommentRequest();
obj1.setAvatar("http://XXXXX");
obj1.setContent("我来了");
obj1.setLoginId(1233L);
obj1.setNick("名称");
obj1.setTopic("2wweerrrrrr");
req.setParamTopTopicCommentRequest(obj1);
LiveCommentsPublishResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<live_comments_publish_response>
    <error_msg>正确</error_msg>
    <status>200</status>
</live_comments_publish_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部