(以“{{api_desc_v2| uri=friendships/groups/show_batch| desc=批量获取好友分组的详细信息| httpMethod=GET| needAuth=是| level={{Api_L2}}| rateLimit=是| params...”为内容创建页面) |
|||
第14行: | 第14行: | ||
"lists": [ | "lists": [ | ||
{ | { | ||
− | "id": | + | "id": 34738874696501900, |
− | "idstr": " | + | "idstr": "34738874696501900", |
− | "name": " | + | "name": "明星", |
− | "mode": " | + | "mode": "public", |
− | "visible": | + | "visible": 1, |
"like_count": 0, | "like_count": 0, | ||
− | "member_count": | + | "member_count": 4, |
− | "description": "", | + | "description": "影视明星", |
− | "tags": [], | + | "tags": [ |
− | "profile_image_url": "http:// | + | "明星" |
+ | ], | ||
+ | "profile_image_url": "http://tp2.sinaimg.cn/17399282700/50/5639466053/0", | ||
"user": { | "user": { | ||
− | "id": | + | "id": 12876111800, |
− | "idstr": " | + | "idstr": "12876111800", |
− | "screen_name": " | + | "screen_name": "张三", |
− | "name": " | + | "name": "张三", |
"province": "11", | "province": "11", | ||
− | "city": " | + | "city": "6", |
− | "location": "北京 | + | "location": "北京 丰台区", |
− | "description": " | + | "description": "IT一族", |
− | "url": "http://blog. | + | "url": "http://12345988.blog.163.com/", |
− | "profile_image_url": "http:// | + | "profile_image_url": "http://tp2.sinaimg.cn/12876111800/50/5600180711/1", |
− | "profile_url": " | + | "profile_url": "7151232400", |
− | "domain": " | + | "domain": "", |
− | "weihao": "", | + | "weihao": "7151232400", |
"gender": "m", | "gender": "m", | ||
− | "followers_count": | + | "followers_count": 136, |
− | "friends_count": | + | "friends_count": 117, |
− | "statuses_count": | + | "statuses_count": 513, |
− | "favourites_count": | + | "favourites_count": 48, |
− | "created_at": " | + | "created_at": "Sat Oct 30 22:15:26 +0800 2010", |
"following": false, | "following": false, | ||
"allow_all_act_msg": false, | "allow_all_act_msg": false, | ||
"geo_enabled": true, | "geo_enabled": true, | ||
"verified": false, | "verified": false, | ||
− | "verified_type": | + | "verified_type": 220, |
− | + | ||
"allow_all_comment": true, | "allow_all_comment": true, | ||
− | "avatar_large": "http:// | + | "avatar_large": "http://tp2.sinaimg.cn/12876111800/180/5600180711/1", |
"verified_reason": "", | "verified_reason": "", | ||
"follow_me": false, | "follow_me": false, | ||
"online_status": 0, | "online_status": 0, | ||
− | "bi_followers_count": | + | "bi_followers_count": 74, |
"lang": "zh-cn" | "lang": "zh-cn" | ||
}, | }, | ||
− | "created_at": " | + | "created_at": "Tue Jul 31 16:19:36 +0800 2012" |
}, | }, | ||
... | ... | ||
], | ], | ||
− | "total_number": | + | "total_number": 1 |
} | } | ||
</pre>| | </pre>| | ||
第69行: | 第70行: | ||
*参数list_ids、uids,批量时用逗号分隔,且必须一一对应,uid为list_id的所有者; | *参数list_ids、uids,批量时用逗号分隔,且必须一一对应,uid为list_id的所有者; | ||
*当要查询的分组为私有分组时,当前登录用户必须为分组的所有者; | *当要查询的分组为私有分组时,当前登录用户必须为分组的所有者; | ||
− | *当前登录用户不是指定好友分组的所有者时,只能获取所有人可见的公开分组、和组内成员可见的公开分组(此时当前登录用户必须是组内成员)的分组信息;| | + | *当前登录用户不是指定好友分组的所有者时,只能获取所有人可见的公开分组、和组内成员可见的公开分组(此时当前登录用户必须是组内成员)的分组信息; |
+ | | | ||
otherInfo=无 | otherInfo=无 | ||
}}{{#a:showgrade}} | }}{{#a:showgrade}} |
2012年10月24日 (三) 15:35的版本
friendships/groups/show_batch
批量获取好友分组的详细信息
URL
https://api.weibo.com/2/friendships/groups/show_batch.json
支持格式
JSON
HTTP请求方式
GET
是否需要登录
是
关于登录授权,参见 如何登录授权
访问授权限制
访问级别:高级接口(需要授权)
频次限制:是
关于频次限制,参见 接口访问权限说明
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
access_token | true | string | 采用OAuth授权方式为必填参数,OAuth授权后获得。 |
list_ids | true | int64 | 需要查询的好友分组ID,建议使用返回值里的idstr,多个之间用逗号分隔,每次不超过20个。 |
uids | true | string | 参数list_ids所指的好友分组的所有者UID,多个之间用逗号分隔,每次不超过20个,需与list_ids一一对应。 |
注意事项
- 参数list_ids、uids,批量时用逗号分隔,且必须一一对应,uid为list_id的所有者;
- 当要查询的分组为私有分组时,当前登录用户必须为分组的所有者;
- 当前登录用户不是指定好友分组的所有者时,只能获取所有人可见的公开分组、和组内成员可见的公开分组(此时当前登录用户必须是组内成员)的分组信息;
调用样例及调试工具
返回结果
JSON示例
{ "lists": [ { "id": 34738874696501900, "idstr": "34738874696501900", "name": "明星", "mode": "public", "visible": 1, "like_count": 0, "member_count": 4, "description": "影视明星", "tags": [ "明星" ], "profile_image_url": "http://tp2.sinaimg.cn/17399282700/50/5639466053/0", "user": { "id": 12876111800, "idstr": "12876111800", "screen_name": "张三", "name": "张三", "province": "11", "city": "6", "location": "北京 丰台区", "description": "IT一族", "url": "http://12345988.blog.163.com/", "profile_image_url": "http://tp2.sinaimg.cn/12876111800/50/5600180711/1", "profile_url": "7151232400", "domain": "", "weihao": "7151232400", "gender": "m", "followers_count": 136, "friends_count": 117, "statuses_count": 513, "favourites_count": 48, "created_at": "Sat Oct 30 22:15:26 +0800 2010", "following": false, "allow_all_act_msg": false, "geo_enabled": true, "verified": false, "verified_type": 220, "allow_all_comment": true, "avatar_large": "http://tp2.sinaimg.cn/12876111800/180/5600180711/1", "verified_reason": "", "follow_me": false, "online_status": 0, "bi_followers_count": 74, "lang": "zh-cn" }, "created_at": "Tue Jul 31 16:19:36 +0800 2012" }, ... ], "total_number": 1 }
关于错误返回值与错误代码,参见 错误代码说明
返回字段说明
无
其他
无
相关问题
{{{relat_qa}}}
到 帮助中心 查看更多问题或提问