C/2/datapush/comment/en

Jump to: navigation, search

datapush/comment

Connect the API to get the comments.

URL

https://c.api.weibo.com/2/datapush/comment.json

Supported Formats

JSON

HTTP Request Method

GET

Requires Login

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

Requests Count Limitation

None

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.
subid true int Subscription ID (See the specification for more information).
since_id false long The data ID application hold when disconnected. Weibo Platform will store datas for 5 minutes. Applications can regain datas within 5 minutes since disconnected by since_id parameter.

Notes

  • Use the url: http://c.api.weibo.com/datapush/comment to call the API.The url: https://c.api.weibo.com/2/datapush/comment.json is invalid.
  • The IP address to call the API must be one of the IP list provided when created the subscription. Otherwise, the error response ‘Ip is limited’ will be returned.
  • Parameter 'source' and 'access_token' are not needed to pass.
  • Data id is the first field returned by this endpoint, and is different from the Weibo id or Comment id.

Response

JSON Example

{
    "id": 1211220000000161,
    "text": {
        "type": "comment",
        "event": "add",
        "comment": {
            "created_at": "Thu Nov 22 14:23:10 +0800 2012",
            "id": 3515170380984186,
            "text": "给力",
            "source": "<a href=\"http://m.weibo.com/web/cellphone.php#mobile\" rel=\"nofollow\">新浪微博手机版</a>",
            "user": {
                
            },
            "mid": "21212112243860601",
            "status": {
                "created_at": "Thu Nov 22 13:53:48 +0800 2012",
                "id": 3515162990652902,
                "text": "本期《音乐新势力》歌曲抢先听: 孙悦《为幸福歌唱》 羽泉《在一起》 王心凌《任性情人》 SHE《心还是热的》 光良《我们的故事》 何洁《Lady Luck》 孙楠《原谅》等。共同期待~~记得准时守候聆听吧。",
                "source": "<a href=\"http://se.360.cn/?fromweibo\" rel=\"nofollow\">360安全浏览器</a>",
                "favorited": false,
                "truncated": false,
                "in_reply_to_status_id": "",
                "in_reply_to_user_id": "",
                "in_reply_to_screen_name": "",
                "geo": null,
                "mid": "3515162990652902",
                "isLongText":false,     //true means the length of weibo text exceeds 140 characters
                "user": {
                    …
                }
            }
        }
    },
    "match_info":{             //匹配信息
        "keyword":"不是",    //匹配上的关键词
        "uid":0              //匹配上的用户ID
    }
}

See the Error Code Description for the error information details.

Field Description

None

Others

None

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


文档更新时间: 10 May 2016
api评价