Followers/ids
目录 |
followers/ids
返回用户粉丝uid列表
URL
http://api.t.sina.com.cn/followers/ids.format
格式
xml, json
HTTP请求方式
GET
是否需要身份验证
false
请求参数
- id. 选填参数. 要获取好友的UID或用户账户
- o 示例: http://api.t.sina.com.cn/followers/ids/12345.xml or http://api.t.sina.com.cn/statuses/friends/bob.xml
- user_id. 选填参数,要获取的UID
- screen_name. 选填参数,要获取的账户ID
- cursor. 选填参数. 单页只能包含5000个id,为了获取更多则cursor默认从-1开始,通过增加或减少cursor来获取更多的关注列表
- o 示例: http://api.t.sina.com.cn/followers/ids.xml?cursor=-1
- o 示例: http://api.t.sina.com.cn/followers/ids.xml?cursor=1300794057949944903
- count. 可选参数. 每次返回的最大记录数(即页面大小),不大于5000。
使用说明
- 如果没有提供cursor参数,将只返回最前面的5000个粉丝id
返回结果
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}
使用示例
- xml:
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