2/friendships/friends/en

Jump to: navigation, search

friendships/friends

Return the friends list of a user.

URL

https://api.weibo.com/2/friendships/friends.json

Supported Formats

JSON

HTTP Request Method

GET

Requires Login

true
See the Login and Authorization Mechanism Statement for login and authorization details.

Requests Count Limitation

Level:Normal
Count Limitation:true
See the Interface Access Rights Statement for the request count limitation details.

Request Parameters

  Requires Type and Range Description
source false string This parameter is not needed when using OAuth.The value of this parameter is the AppKey.
access_token false string This parameter is required when using OAuth.You will get the access_token after oauth authorization.
uid false int64 User ID to be queried.
screen_name false string User nickname to be queried.
count false int The returned count for every page.The default value is 50. The max value is 200.
cursor false int The cursor of the returned data.The returned next_cursor is for the next page.The returned previous_cursor is for the previous page. Default is 0.

Notes

You must provide a parameter either uid or screen_name.

Response

JSON Example

{
    "users": [
        {
            "id": 1404376560,
            "screen_name": "zaku",
            "name": "zaku",
            "province": "11",
            "city": "5",
            "location": "北京 朝阳区",
            "description": "人生五十年,乃如梦如幻;有生斯有死,壮士复何憾。",
            "url": "http://blog.sina.com.cn/zaku",
            "profile_image_url": "http://tp1.sinaimg.cn/1404376560/50/0/1",
            "domain": "zaku",
            "gender": "m",
            "followers_count": 1204,
            "friends_count": 447,
            "statuses_count": 2908,
            "favourites_count": 0,
            "created_at": "Fri Aug 28 00:00:00 +0800 2009",
            "following": false,
            "allow_all_act_msg": false,
            "remark": "",
            "geo_enabled": true,
            "verified": false,
            "status": {
                "created_at": "Tue May 24 18:04:53 +0800 2011",
                "id": 11142488790,
                "text": "我的相机到了。",
                "source": "<a href="http://weibo.com" rel="nofollow">新浪微博</a>",
                "favorited": false,
                "truncated": false,
                "in_reply_to_status_id": "",
                "in_reply_to_user_id": "",
                "in_reply_to_screen_name": "",
                "geo": null,
                "mid": "5610221544300749636",
                "annotations": [],
                "reposts_count": 5,
                "comments_count": 8
            },
            "allow_all_comment": true,
            "avatar_large": "http://tp1.sinaimg.cn/1404376560/180/0/1",
            "verified_reason": "",
            "follow_me": false,
            "online_status": 0,
            "bi_followers_count": 215
        },
        ...
    ],
    "next_cursor": 5,
    "previous_cursor": 0,
    "total_number": 668
}

See the Error Code Description for the error information details.

Field Description

Returned Field Field Type Field Description
id int64 User ID
screen_name string User nickname
name string Friendly displayed name
province int Province ID user located
city int City ID user located
location string Address user located
description string User description
url string Url of the user’s blog
profile_image_url string Profile image
domain string The user’s personalized weibo url
gender string Gender, m--male, f-- female, n-- unknown
followers_count int Followers count
friends_count int Friends count
statuses_count int Weibo count
favourites_count int Favorites count
created_at string Created time
following boolean Whether the current user is following the user
allow_all_act_msg boolean Whether all the people can send direct message to the user
geo_enabled boolean Whether can have the geography information
verified boolean Whether the user is verified by his real identity, marked with “V”
allow_all_comment boolean Whether all the people can comment the user's weibo
avatar_large string Profile large image
verified_reason string verification reason
follow_me boolean Whether the user is following the current user
online_status int Whether the user is online,0:offline、1:online
bi_followers_count int The count of the users that are following the user and are being followed by the user
status object The latest weibo of the user

Others

None



Language: [[{{{2/uri}}}|中文]]


文档更新时间: 8 January 2012