Followers/ids

跳转到: 导航, 搜索
(请求参数)
 
(未显示4个用户的8个中间版本)
第1行: 第1行:
== followers/ids ==
+
{{api_desc2|
返回用户粉丝uid列表
+
uri=followers/ids|
 
+
desc=返回用户的粉丝用户ID列表|
=== URL===
+
format=XML/JSON|
http://api.t.sina.com.cn/followers/ids.format
+
httpMethod=GET|
+
needAuth=true|
=== 格式===
+
rateLimit=true|
xml, json
+
params={{api_args|:id|false|int64/string|用户的ID(int64)或者微博昵称(string)。该参数为REST风格的参数,用法参见注意事项。}}
 
+
{{api_args|user_id|false|int64|要获取的粉丝列表所属的用户的ID。}}
=== HTTP请求方式===
+
{{api_args|screen_name|false|string|要获取的粉丝列表所属的用户微博昵称。}}
GET
+
{{api_args|count|false|int,默认500,最大5000|单页记录数。}}
+
{{api_args|cursor|false|int,默认-1。|游标。单页最多返回5000条记录。通过增加或减少cursor值来获取更多的粉丝列表。如果提供该参数,返回结果中将给出下一页的起始游标。}}|
=== 是否需要身份验证===
+
getParam=&user_id=11051|
false
+
postParam=|
 
+
result=
=== 请求参数===
+
===XML示例===
* id.  选填参数.  要获取好友的UID或微博昵称 
+
<pre>
:o 示例: http://api.t.sina.com.cn/followers/ids/12345.xml or http://api.t.sina.com.cn/statuses/friends/bob.xml
+
<?xml version="1.0" encoding="UTF-8"?>  
* user_id.  选填参数,要获取的UID
+
<id_list>
:o 示例: http://api.t.sina.com.cn/followers/ids.xml?user_id=1401881
+
    <ids>
* screen_name.  选填参数,要获取的微博昵称
+
        <id>9448</id>
:o 示例: http://api.t.sina.com.cn/followers/ids.xml?screen_name=101010
+
        <id>16825</id>
* cursor. 选填参数. 单页只能包含5000个id,为了获取更多则cursor默认从-1开始,通过增加或减少cursor来获取更多的关注列表
+
        ......
:o 示例: http://api.t.sina.com.cn/followers/ids.xml?cursor=-1
+
    </ids>
:o 示例: http://api.t.sina.com.cn/followers/ids.xml?cursor=1300794057949944903
+
    <next_cursor>3</next_cursor>
* count.  可选参数.  每次返回的最大记录数(即页面大小),不大于5000,默认返回500。
+
    <previous_cursor>0</previous_cursor>
:o 示例: http://api.t.sina.com.cn/followers/ids.xml?&count=200
+
</id_list>
 
+
</pre>
=== 使用说明===
+
===JSON示例===
* 如果没有提供cursor参数,将只返回最前面的5000个粉丝id
+
<pre>
 
+
{
=== 返回结果 ===
+
  "ids":
 
+
  [
XML示例:
+
    9448,
 
+
<?xml version="1.0" encoding="UTF-8"?>  
+
<id_list>
+
    <ids>
+
          <id>9448</id>
+
          <id>16825</id>
+
          ......
+
    </ids>
+
    <next_cursor>3</next_cursor>
+
    <previous_cursor>0</previous_cursor>
+
</id_list>
+
 
+
JSON示例:
+
 
+
  {"ids":
+
  [9448,
+
 
     16825,
 
     16825,
 
     .....
 
     .....
    ],
+
  ],
    "next_cursor":3,
+
  "next_cursor":3,
    "previous_cursor":0}
+
  "previous_cursor":0
 
+
}
=== 使用示例===
+
</pre>|
 
+
useAge=
* xml:
+
* :id为REST风格的参数,使用该参数的URL为:<br/> http://api.t.sina.com.cn/followers/ids/:id.format <br/> 使用示例如下:<br/> http://api.t.sina.com.cn/followers/ids/123456.xml?source=appkey<br/>http://api.t.sina.com.cn/followers/ids/123456.json?source=appkey|
 
+
otherInfo=无
curl -u user:password http://api.t.sina.com.cn/followers/ids.xml or http://api.t.sina.com.cn/followers/ids/timyang.xml or http://api.t.sina.com.cn/followers/ids/timyang.xml?cursor=1
+
}}
 
+
* josn:
+
 
+
curl -u user:password http://api.t.sina.com.cn/followers/ids.xml or http://api.t.sina.com.cn/followers/ids/timyang.xml or http://api.t.sina.com.cn/followers/ids/timyang.xml?cursor=1
+

2010年12月6日 (一) 17:20的最后版本

目录

followers/ids

返回用户的粉丝用户ID列表

URL

http://api.t.sina.com.cn/followers/ids.(json%7Cxml)

支持格式

XML/JSON

HTTP请求方式

GET

是否需要登录

true
关于授权机制,参见授权机制声明

请求数限制

true
关于请求数限制,参见接口访问权限说明

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
:id false int64/string 用户的ID(int64)或者微博昵称(string)。该参数为REST风格的参数,用法参见注意事项。
user_id false int64 要获取的粉丝列表所属的用户的ID。
screen_name false string 要获取的粉丝列表所属的用户微博昵称。
count false int,默认500,最大5000 单页记录数。
cursor false int,默认-1。 游标。单页最多返回5000条记录。通过增加或减少cursor值来获取更多的粉丝列表。如果提供该参数,返回结果中将给出下一页的起始游标。

注意事项

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?> 
<id_list>
    <ids>
         <id>9448</id>
         <id>16825</id>
         ......
    </ids>
    <next_cursor>3</next_cursor>
    <previous_cursor>0</previous_cursor>
</id_list>

JSON示例

{
  "ids":
  [
    9448,
    16825,
    .....
  ],
  "next_cursor":3,
  "previous_cursor":0
}

其他

文档更新时间: 2010-12-06