跳转到: 导航, 搜索
 
第1行: 第1行:
注:此页面的接口为已经停止开放的接口。(去正式的[[API文档_V2|接口文档]])
 
<div style="display:none">
 
 
 
{{api_desc_v2|
 
{{api_desc_v2|
 
uri=friendships/groups|
 
uri=friendships/groups|
第74行: 第71行:
 
otherInfo=无
 
otherInfo=无
 
}}{{#a:showgrade}}
 
}}{{#a:showgrade}}
 
</div>
 

2020年8月7日 (五) 11:08的最后版本

friendships/groups

获取当前登陆用户好友分组列表

URL

https://api.weibo.com/2/friendships/groups.json

支持格式

JSON

HTTP请求方式

GET

是否需要登录


关于登录授权,参见 如何登录授权

访问授权限制

访问级别:高级接口(需要授权)
频次限制:
关于频次限制,参见 接口访问权限说明

请求参数

  必选 类型及范围 说明
access_token true string 采用OAuth授权方式为必填参数,OAuth授权后获得。

注意事项

  • 返回的数据按设置的分组顺序排序;
  • 好友分组上限为20,“未分组”不计入上限;
  • "未分组"的分组ID为0,此接口不返回“未分组”;

调用样例及调试工具

API测试工具

返回结果

JSON示例

{
    "lists": [
        {
            "id": 221012250012006340,
            "idstr": "221012250012006330",
            "name": "同学",
            "mode": "private",
            "visible": 0,
            "like_count": 0,
            "member_count": 41,
            "description": "",
            "tags": [],
            "profile_image_url": "http://tp3.sinaimg.cn/2476776294/50/5619144918/1",
            "user": {
                "id": 1902538057,
                "idstr": "1902538057",
                "screen_name": "张三",
                "name": "张三",
                "province": "11",
                "city": "8",
                "location": "北京 海淀区",
                "description": "做最受尊敬的互联网产品经理...",
                "url": "",
                "profile_image_url": "http://tp2.sinaimg.cn/1902538057/50/22817372040/1",
                "profile_url": "304270168",
                "domain": "shenbinzhu",
                "weihao": "304270168",
                "gender": "m",
                "followers_count": 337,
                "friends_count": 534,
                "statuses_count": 516,
                "favourites_count": 60,
                "created_at": "Sat Dec 25 14:12:35 +0800 2010",
                "following": false,
                "allow_all_act_msg": true,
                "geo_enabled": true,
                "verified": false,
                "verified_type": 220,
                "allow_all_comment": true,
                "avatar_large": "http://tp2.sinaimg.cn/1902538057/180/22817372040/1",
                "verified_reason": "",
                "follow_me": false,
                "online_status": 0,
                "bi_followers_count": 185,
                "lang": "zh-cn"
            },
            "created_at": "Sat Dec 25 14:12:35 +0800 2010"
        },
        ...
    ],
    "total_number": 13
}

关于错误返回值与错误代码,参见 错误代码说明

返回字段说明

其他

相关问题


帮助中心 查看更多问题或提问


Language: [[{{{2/uri}}}|中文]]




文档更新时间: 2020-08-07
api评价