C/2/statuses/upload/biz-en

跳转到: 导航, 搜索

statuses/upload/biz

Upload a picture and publish a post.

URL

https://c.api.weibo.com/2/statuses/upload/biz.json

Supported Formats

JSON

HTTP Request Method

POST

Requires Login

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

Requests Count Limitation


Request all APIs:

    • 50000/hour/IP;

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.
status true string Text content to be published, must be URL encoded, and not exceeding 140 Chinese characters.
visible false int The visibility of the post, 0 for everyone, 1 for oneself, 2 for close friend, 3 for designated group, default as 0.
list_id false string Desiganated group ID to which post visible to, required and effective only when parameter visible is 3.
pic true binary The picture to be uploaded, support JPEG, GIF and PNG, with size less than 5 Megabytes.
lat false float Latitude, range from -90.0 to +90.0, in which '+' means North, default as 0.0
long false float Longitude, range from -180.0 to +180.0, in which '+' means East, default as 0.0
annotations false string Metadata, for third party application record necessary information. Each post contains one or more metadata, in json format, and no more than 512 characters, content could be self-defined.
rip false string The real user IP address reported by the developer, formatted like: 211.156.0.1.

Notes

  • HTTP request method must be 'POST', and encoded using multipart/form-data.
  • Non-member user can only publish directed post to group less than 200 people.

Response

JSON Example

//成功返回
{
    "created_at": "Wed Oct 24 23:49:17 +0800 2012",
    "id": 3504803600500000,
    "mid": "3504803600502730",
    "idstr": "3504803600502730",
    "text": "分组定向图片微博",
    "source": "新浪微博</a>",
    "favorited": false,
    "truncated": false,
    "in_reply_to_status_id": "",
    "in_reply_to_user_id": "",
    "in_reply_to_screen_name": "",
    "thumbnail_pic": "http://ww2.sinaimg.cn/thumbnail/71666d49jw1dy6q8t3p0rj.jpg",
    "bmiddle_pic": "http://ww2.sinaimg.cn/bmiddle/71666d49jw1dy6q8t3p0rj.jpg",
    "original_pic": "http://ww2.sinaimg.cn/large/71666d49jw1dy6q8t3p0rj.jpg",
    "geo": {
        "type": "Point",
        "coordinates": [
            40.413467,
            116.646439
        ]
    },
    "user": {
        "id": 1902538057,
        "idstr": "1902538057",
        "screen_name": "张三",
        "name": "张三",
        "province": "11",
        "city": "8",
        "location": "北京 海淀区",
        "description": "做最受尊敬的互联网产品经理...",
        "url": "",
        "profile_image_url": "http://tp2.sinaimg.cn/1902538057/50/22817372040/1",
        "profile_url": "304270168",
        "domain": "shenbinzhu",
        "weihao": "304270168",
        "gender": "m",
        "followers_count": 337,
        "friends_count": 534,
        "statuses_count": 516,
        "favourites_count": 60,
        "created_at": "Sat Dec 25 14:12:35 +0800 2010",
        "following": false,
        "allow_all_act_msg": true,
        "geo_enabled": true,
        "verified": false,
        "verified_type": 220,
        "allow_all_comment": true,
        "avatar_large": "http://tp2.sinaimg.cn/1902538057/180/22817372040/1",
        "verified_reason": "",
        "follow_me": false,
        "online_status": 0,
        "bi_followers_count": 185,
        "lang": "zh-cn",
        "level": 7,
        "type": 1,
        "ulevel": 0,
        "badge": {
            "kuainv": {
                "level": 0
            },
            "uc_domain": 0,
            "enterprise": 0,
            "anniversary": 0
        }
    },
    "reposts_count": 0,
    "comments_count": 0,
    "attitudes_count": 0,
    "mlevel": 0,
    "visible": {
        "type": 3,
        "list_id": 3469454702570000
    }
}
//失败返回
{
    "request": "/statuses/upload/biz.json",
    "error_code": XXXXX,
    "error": "error message."
}

See the Error Code Description for the error information details.

Field Description

none

Others

none

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


文档更新时间: 2015-07-23
api评价