friendships/groups/create
创建好友分组
URL
https://api.weibo.com/2/friendships/groups/create.json
支持格式
JSON
HTTP请求方式
POST
是否需要登录
是
关于登录授权,参见 如何登录授权
访问授权限制
访问级别:高级接口(需要授权)
频次限制:是
关于频次限制,参见 接口访问权限说明
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
access_token | true | string | 采用OAuth授权方式为必填参数,OAuth授权后获得。 |
name | true | string | 要创建的好友分组的名称,不超过10个汉字,20个半角字符。 |
description | false | string | 要创建的好友分组的描述,不超过70个汉字,140个半角字符。 |
tags | false | string | 要创建的好友分组的标签,多个之间用逗号分隔,最多不超过10个,每个不超过7个汉字,14个半角字符。 |
注意事项
- 每个用户最多能够创建20个好友分组;
- 重复创建同名分组将给出错误;
- 用户自己创建的分组,相互之间名称不能重复;
调用样例及调试工具
返回结果
JSON示例
{ "id": 3479298377907800, "idstr": "3479298377907807", "name": "分组测试以下", "mode": "public", "visible": 1, "like_count": 0, "member_count": 0, "description": "分组public1", "tags": [ "分组标签1", "分组标签2" ], "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", "user": { "id": 2489518277, "idstr": "2489518277", "screen_name": "虎贲Geek", "name": "虎贲Geek", "province": "11", "city": "8", "location": "北京 海淀区", "description": "", "url": "", "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", "profile_url": "hubengeek", "domain": "hubengeek", "weihao": "", "gender": "m", "followers_count": 25, "friends_count": 141, "statuses_count": 22, "favourites_count": 3, "created_at": "Thu Nov 24 10:27:36 +0800 2011", "following": false, "allow_all_act_msg": false, "geo_enabled": true, "verified": false, "verified_type": -1, "allow_all_comment": true, "avatar_large": "http://tp2.sinaimg.cn/2489518277/180/5617069329/1", "verified_reason": "", "follow_me": false, "online_status": 0, "bi_followers_count": 2, "lang": "zh-cn" }, "created_at": "Wed Aug 15 14:40:38 +0800 2012" }
关于错误返回值与错误代码,参见 错误代码说明
返回字段说明
无
其他
无
相关问题
{{{relat_qa}}}
到 帮助中心 查看更多问题或提问