Friends/ids/en

Jump to: navigation, search

Contents

friends/ids

Returns a list of IDs that user follows.

URL

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

Supported Formats

XML/JSON

HTTP Request Method

GET

Requires Authentication

true
See the Authorization Mechanism Statement for authorization details

Requests Count Limitation

true
See the Interface Access Rights Statement for the Request Count Limitaiton details.

Request Parameters

  Requires Type and Range Description
source true string AppKey for the application to identify it. ( This parameter is not needed when using OAuth)
:id false int64/string The ID(int64) or screen-name(string) of the user to be friended. This is is a RESTful parameter. On usage please see Notes.
user_id false int64 User ID. The friend list to be get belongs to this user.
screen_name false string Screen name. The friend list to be get belongs to this user.
count false int,default is 500,max is 5000 Record counts of a single page.
cursor false int,default is -1。 Used for page request. Passes -1 for requesting the 1st page, next_cursor is returned for cursor of netxt page. It is at the end of the record when next_cursor is 0.

Notes

Example Request

XML
curl -u "username:password" "http://api.t.sina.com.cn/friends/ids.xml?source=appkey&user_id=11051"
JSON
curl -u "username:password" "http://api.t.sina.com.cn/friends/ids.json?source=appkey&user_id=11051"

Response

XML Example

<?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 Example

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

Others

None

文档更新时间: 20 January 2011