第10行: | 第10行: | ||
{{api_args|description|false|string|要创建的好友分组的描述,不超过70个汉字,140个半角字符。}} | {{api_args|description|false|string|要创建的好友分组的描述,不超过70个汉字,140个半角字符。}} | ||
{{api_args|tags|false|string|要创建的好友分组的标签,多个之间用逗号分隔,最多不超过10个,每个不超过7个汉字,14个半角字符。}} | {{api_args|tags|false|string|要创建的好友分组的标签,多个之间用逗号分隔,最多不超过10个,每个不超过7个汉字,14个半角字符。}} | ||
− | + | | | |
− | + | ||
result= | result= | ||
<pre> | <pre> | ||
{ | { | ||
− | "id": | + | "id": 3479298377907800, |
− | "idstr": " | + | "idstr": "3479298377907807", |
− | "name": " | + | "name": "分组测试以下", |
− | "mode": " | + | "mode": "public", |
− | "visible": | + | "visible": 1, |
"like_count": 0, | "like_count": 0, | ||
"member_count": 0, | "member_count": 0, | ||
− | "description": "", | + | "description": "分组public1", |
− | "tags": [], | + | "tags": [ |
− | "profile_image_url": "http:// | + | "分组标签1", |
+ | "分组标签2" | ||
+ | ], | ||
+ | "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", | ||
"user": { | "user": { | ||
− | "id": | + | "id": 2489518277, |
− | "idstr": " | + | "idstr": "2489518277", |
− | "screen_name": " | + | "screen_name": "虎贲Geek", |
− | "name": " | + | "name": "虎贲Geek", |
"province": "11", | "province": "11", | ||
− | "city": " | + | "city": "8", |
− | "location": "北京 | + | "location": "北京 海淀区", |
− | "description": " | + | "description": "", |
− | "url": " | + | "url": "", |
− | "profile_image_url": "http:// | + | "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", |
− | "profile_url": " | + | "profile_url": "hubengeek", |
− | "domain": " | + | "domain": "hubengeek", |
"weihao": "", | "weihao": "", | ||
"gender": "m", | "gender": "m", | ||
− | "followers_count": | + | "followers_count": 25, |
− | "friends_count": | + | "friends_count": 141, |
− | "statuses_count": | + | "statuses_count": 22, |
− | "favourites_count": | + | "favourites_count": 3, |
− | "created_at": " | + | "created_at": "Thu Nov 24 10:27:36 +0800 2011", |
"following": false, | "following": false, | ||
"allow_all_act_msg": false, | "allow_all_act_msg": false, | ||
第50行: | 第52行: | ||
"verified": false, | "verified": false, | ||
"verified_type": -1, | "verified_type": -1, | ||
− | |||
"allow_all_comment": true, | "allow_all_comment": true, | ||
− | "avatar_large": "http:// | + | "avatar_large": "http://tp2.sinaimg.cn/2489518277/180/5617069329/1", |
"verified_reason": "", | "verified_reason": "", | ||
"follow_me": false, | "follow_me": false, | ||
"online_status": 0, | "online_status": 0, | ||
− | "bi_followers_count": | + | "bi_followers_count": 2, |
"lang": "zh-cn" | "lang": "zh-cn" | ||
}, | }, | ||
− | "created_at": " | + | "created_at": "Wed Aug 15 14:40:38 +0800 2012" |
} | } | ||
</pre>| | </pre>| | ||
第66行: | 第67行: | ||
*每个用户最多能够创建20个好友分组; | *每个用户最多能够创建20个好友分组; | ||
*重复创建同名分组将给出错误; | *重复创建同名分组将给出错误; | ||
− | *用户自己创建的分组,相互之间名称不能重复; | + | *用户自己创建的分组,相互之间名称不能重复;| |
− | + | ||
− | + | ||
− | + | ||
otherInfo=无 | otherInfo=无 | ||
}}{{#a:showgrade}} | }}{{#a:showgrade}} |
2012年10月24日 (三) 16:18的版本
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}}}
到 帮助中心 查看更多问题或提问