C/2/comments/tree/root child
第1行: | 第1行: | ||
{{Api_desc_business| | {{Api_desc_business| | ||
− | uri=comments/tree/ | + | uri=comments/tree/root_list| |
desc=根据微博id获取评论楼层列表和子评论列表(超级话题)| | desc=根据微博id获取评论楼层列表和子评论列表(超级话题)| | ||
httpMethod=GET| | httpMethod=GET| |
2020年7月24日 (五) 16:28的最后版本
comments/tree/root_list
根据微博id获取评论楼层列表和子评论列表(超级话题)
URL
https://c.api.weibo.com/2/comments/tree/root_list.json
支持格式
JSON
HTTP请求方式
GET
是否需要登录
是
关于登录授权,参见 如何登录授权
访问授权限制
请求所有商业接口:
- 50000次/小时/IP;
- 50000次/小时/IP;
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
source | false | string | 采用OAuth授权方式不需要此参数,其他授权方式为必填参数,数值为应用的AppKey。 |
access_token | false | string | 采用OAuth授权方式为必填参数,其他授权方式不需要此参数,OAuth授权后获得。 |
id | true | int64 | 需要查询的微博ID。 |
since_id | false | int64 | 若指定此参数,则返回ID比since_id大的楼层评论(即比since_id时间晚的楼层评论),默认为0。 |
max_id | false | int64 | 若指定此参数,则返回ID小于或等于max_id的楼层评论,默认为0。 |
page | false | int | 返回结果的页码,默认为1。 |
count | false | int | 返回楼层评论的条数数量,最大不超过200,默认为5。 |
child_count | false | int | 返回楼层内子评论的条数数量,最大不超过200,默认为5。 |
is_asc | false | int | 是否按照时间降序展示。0:降序,1:升序。默认为0。 |
trim_user | false | int | 返回值中user字段开关,0:返回完整user字段、1:user字段仅返回uid,默认为0。 |
is_encoded | false | int | 返回结果是否转义,0:不转义,1:转义,默认为0。 |
注意事项
需要转义的符号: & " < >,规则为: & 转为 & 、< 转为 < 、> 转为 > 、" 转为 "
返回结果
JSON示例
//成功返回 { "root_comments":[ { "created_at":"Tue Jun 21 18:56:32 +0800 2016", "id":3988880119873594, "rootid":3988880119873594, "floor_number":37, "text":"etttdasdasfasdtttadffftasdfadfasdft http://t.cn/z8AIfIs", "user":{}, "mid":3986644119994028, "status":{}, "comments":[ { "created_at":"Tue Jun 21 18:57:43 +0800 2016", "id":3988880413700361, "rootid":3988880119873594, "floor_number":0, "text":"回复@contentnew1442:super topic reply C97asdadsafd05 http://t.cn/z8AIfIs", "source_allowclick":0, "source_type":1, "source":"<a href=\"http://app.weibo.com/t/feed/5xCS0B\" rel=\"nofollow\">微博手机版<\/a>", "user":{}, "mid":"3988880413700361", "idstr":"3988880413700361", "status":{}, "reply_comment":{}, "url_objects":[], "liked":false }, {} ], "hasvisible":false, "previous_cursor":3988880413700362, "next_cursor":3988880321604799, "total_number":2, "since_id":3988880413700362, "max_id":3988880321604799 }, {}, {}, {}, {} ], "hasvisible":false, "previous_cursor":3988880119873595, "next_cursor":3988872691803153, "total_number":0, "since_id":3988880119873595, "max_id":3988872691803153 } //失败返回 { "request": "/2/comments/root_child_comments.json", "error_code": "201XX", "error": "error message." }
关于错误返回值与错误代码,参见 错误代码说明
字段说明
{{{resultDes}}}
其他
无
文档更新时间: 2020-07-24