Statuses/comment/destroy batch/en

跳转到: 导航, 搜索

目录

statuses/comment/destroy_batch

Delet a batch of comments. Note can’t delete others’ comments but onl the comments belonged to the authenticating user.

URL

http://api.t.sina.com.cn/statuses/comment/destroy_batch.(json%7Cxml)

Supported Formats

XML/JSON

HTTP Request Method

POST/DELETE

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)
ids true int64 A list of IDs of the comments to be deleted separated by comma, 20 ids at the most.

Notes

  • If some IDs of the list are not in the user’s comments_by_me list, only the comments in comments_by_me list can be delete, and return then list of deleted comments.
  • If none of the ids in the to be deleted list is in the comments_by_me list, it returns a null list.

Example Request

XML
curl -u "username:password" -d "ids=4976494627,4976262053" "http://api.t.sina.com.cn/statuses/comment/destroy_batch.xml?source=appkey"
JSON
curl -u "username:password" -d "ids=4976494627,4976262053" "http://api.t.sina.com.cn/statuses/comment/destroy_batch.json?source=appkey"

Response

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<comments>
  <comment>
    <created_at>Fri Dec 03 10:22:44 +0800 2010</created_at>
    <id>4976730453</id>
    <text>wahaha</text>
    <user>
      <id>1658122963</id>
      <screen_name>zhangwei217245</screen_name>
      <name>zhangwei217245</name>
      <province>11</province>
      <city>5</city>
      <location>北京 朝阳区</location>
      <description>ABCDE</description>
      <url/>
      <profile_image_url>http://tp4.sinaimg.cn/1658122963/50/1282754213</profile_image_url>
      <domain>zhangwei217245</domain>
      <gender>m</gender>
      <followers_count>22</followers_count>
      <friends_count>43</friends_count>
      <statuses_count>115</statuses_count>
      <favourites_count>3</favourites_count>
      <created_at>Tue Nov 03 00:00:00 +0800 2009</created_at>
      <following>false</following>
      <verified>false</verified>
      <allow_all_act_msg>false</allow_all_act_msg>
      <geo_enabled>true</geo_enabled>
    </user>
    <status>
      <created_at>Fri Dec 03 09:25:51 +0800 2010</created_at>
      <id>4046214423</id>
      <text>维基解密新主机被曝位于军事掩体内(图) http://sinaurl.cn/hbqEya</text>
      <source>
        <a href="http://tech.sina.com.cn/">新浪科技</a>
      </source>
      <favorited>false</favorited>
      <truncated>false</truncated>
      <geo/>
      <in_reply_to_status_id/>
      <in_reply_to_user_id/>
      <in_reply_to_screen_name/>
      <thumbnail_pic>http://ww3.sinaimg.cn/thumbnail/63743d1cjw6dbz63h1rfrj.jpg</thumbnail_pic>
      <bmiddle_pic>http://ww3.sinaimg.cn/bmiddle/63743d1cjw6dbz63h1rfrj.jpg</bmiddle_pic>
      <original_pic>http://ww3.sinaimg.cn/large/63743d1cjw6dbz63h1rfrj.jpg</original_pic>
      <user>
        <id>1668562204</id>
        <screen_name>赵海俊的微薄</screen_name>
        <name>赵海俊的微薄</name>
        <province>11</province>
        <city>5</city>
        <location>北京 朝阳区</location>
        <description>运动健将</description>
        <url>http://blog.sina.com.cn/eshesoulheart</url>
        <profile_image_url>http://tp1.sinaimg.cn/1668562204/50/1279885528/1</profile_image_url>
        <domain/>
        <gender>m</gender>
        <followers_count>315</followers_count>
        <friends_count>611</friends_count>
        <statuses_count>2984</statuses_count>
        <favourites_count>53</favourites_count>
        <created_at>Thu Dec 10 00:00:00 +0800 2009</created_at>
        <following>false</following>
        <verified>false</verified>
        <allow_all_act_msg>false</allow_all_act_msg>
        <geo_enabled>true</geo_enabled>
      </user>
      <annotations/>
    </status>
  </comment>
  <comment>
    <created_at>Fri Dec 03 10:20:24 +0800 2010</created_at>
    <id>4976673859</id>
    <text>回复@zhangwei217245:make a test</text>
    <user>
      <id>1658122963</id>
      <screen_name>zhangwei217245</screen_name>
      <name>zhangwei217245</name>
      <province>11</province>
      <city>5</city>
      <location>北京 朝阳区</location>
      <description>ABCDE</description>
      <url/>
      <profile_image_url>http://tp4.sinaimg.cn/1658122963/50/1282754213</profile_image_url>
      <domain>zhangwei217245</domain>
      <gender>m</gender>
      <followers_count>22</followers_count>
      <friends_count>43</friends_count>
      <statuses_count>115</statuses_count>
      <favourites_count>3</favourites_count>
      <created_at>Tue Nov 03 00:00:00 +0800 2009</created_at>
      <following>false</following>
      <verified>false</verified>
      <allow_all_act_msg>false</allow_all_act_msg>
      <geo_enabled>true</geo_enabled>
    </user>
    <status>
      <created_at>Thu Dec 02 17:14:39 +0800 2010</created_at>
      <id>4023227965</id>
      <text>哇哈哈。随便输了个经纬度,就跑到海里去发微博了</text>
      <source>
        <a href="http://t.sina.com.cn">新浪微博</a>
      </source>
      <favorited>false</favorited>
      <truncated>false</truncated>
      <geo/>
      <in_reply_to_status_id/>
      <in_reply_to_user_id/>
      <in_reply_to_screen_name/>
      <user>
        <id>1658122963</id>
        <screen_name>zhangwei217245</screen_name>
        <name>zhangwei217245</name>
        <province>11</province>
        <city>5</city>
        <location>北京 朝阳区</location>
        <description>ABCDE</description>
        <url/>
        <profile_image_url>http://tp4.sinaimg.cn/1658122963/50/1282754213</profile_image_url>
        <domain>zhangwei217245</domain>
        <gender>m</gender>
        <followers_count>22</followers_count>
        <friends_count>43</friends_count>
        <statuses_count>115</statuses_count>
        <favourites_count>3</favourites_count>
        <created_at>Tue Nov 03 00:00:00 +0800 2009</created_at>
        <following>false</following>
        <verified>false</verified>
        <allow_all_act_msg>false</allow_all_act_msg>
        <geo_enabled>true</geo_enabled>
      </user>
      <retweeted_status>
        <created_at>Thu Dec 02 17:06:40 +0800 2010</created_at>
        <id>4023064087</id>
        <text>abc</text>
        <source>
          <a href="">微博开放平台接口</a>
        </source>
        <favorited>false</favorited>
        <truncated>false</truncated>
        <geo xmlns:georss="http://www.georss.org/georss">
          <georss:point>39.8765 119.5678</georss:point>
        </geo>
        <in_reply_to_status_id/>
        <in_reply_to_user_id/>
        <in_reply_to_screen_name/>
        <thumbnail_pic>http://ww2.sinaimg.cn/thumbnail/6b85067djw6dbydsnam1xj.jpg</thumbnail_pic>
        <bmiddle_pic>http://ww2.sinaimg.cn/bmiddle/6b85067djw6dbydsnam1xj.jpg</bmiddle_pic>
        <original_pic>http://ww2.sinaimg.cn/large/6b85067djw6dbydsnam1xj.jpg</original_pic>
        <user>
          <id>1803880061</id>
          <screen_name>LoopB</screen_name>
          <name>LoopB</name>
          <province>11</province>
          <city>8</city>
          <location>北京 海淀区</location>
          <description/>
          <url/>
          <profile_image_url>http://tp2.sinaimg.cn/1803880061/50/0/0</profile_image_url>
          <domain/>
          <gender>f</gender>
          <followers_count>1</followers_count>
          <friends_count>1</friends_count>
          <statuses_count>21</statuses_count>
          <favourites_count>4</favourites_count>
          <created_at>Fri Aug 27 00:00:00 +0800 2010</created_at>
          <following>false</following>
          <verified>false</verified>
          <allow_all_act_msg>false</allow_all_act_msg>
          <geo_enabled>true</geo_enabled>
        </user>
      </retweeted_status>
      <annotations/>
    </status>
    <reply_comment>
      <created_at>Thu Dec 02 17:25:25 +0800 2010</created_at>
      <id>4949855625</id>
      <text>小新小新。。。我是小浪~~~</text>
      <user>
        <id>1658122963</id>
        <screen_name>zhangwei217245</screen_name>
        <name>zhangwei217245</name>
        <province>11</province>
        <city>5</city>
        <location>北京 朝阳区</location>
        <description>ABCDE</description>
        <url/>
        <profile_image_url>http://tp4.sinaimg.cn/1658122963/50/1282754213</profile_image_url>
        <domain>zhangwei217245</domain>
        <gender>m</gender>
        <followers_count>22</followers_count>
        <friends_count>43</friends_count>
        <statuses_count>115</statuses_count>
        <favourites_count>3</favourites_count>
        <created_at>Tue Nov 03 00:00:00 +0800 2009</created_at>
        <following>false</following>
        <verified>false</verified>
        <allow_all_act_msg>false</allow_all_act_msg>
        <geo_enabled>true</geo_enabled>
      </user>
    </reply_comment>
  </comment>
</comments>

JSON Example

[
    {
        "id" : 4976494627,
        "text" : "回复@zhangwei217245:haha ",
        "created_at" : "Fri Dec 03 10:12:58 +0800 2010",
        "reply_comment" : 
        {
            "id" : 4976262053,
            "text" : "有ZF 支持??",
            "created_at" : "Fri Dec 03 10:03:12 +0800 2010",
            "user" : 
            {
                "name" : "zhangwei217245",
                "domain" : "zhangwei217245",
                "geo_enabled" : true,
                "followers_count" : 22,
                "statuses_count" : 115,
                "favourites_count" : 3,
                "city" : "5",
                "description" : "ABCDE",
                "verified" : false,
                "id" : 1658122963,
                "gender" : "m",
                "friends_count" : 43,
                "screen_name" : "zhangwei217245",
                "allow_all_act_msg" : false,
                "following" : false,
                "url" : "",
                "profile_image_url" : "http://tp4.sinaimg.cn/1658122963/50/1282754213",
                "created_at" : "Tue Nov 03 00:00:00 +0800 2009",
                "province" : "11",
                "location" : "北京 朝阳区"
            }
        },
        "user" : 
        {
            "name" : "zhangwei217245",
            "domain" : "zhangwei217245",
            "geo_enabled" : true,
            "followers_count" : 22,
            "statuses_count" : 115,
            "favourites_count" : 3,
            "city" : "5",
            "description" : "ABCDE",
            "verified" : false,
            "id" : 1658122963,
            "gender" : "m",
            "friends_count" : 43,
            "screen_name" : "zhangwei217245",
            "allow_all_act_msg" : false,
            "following" : false,
            "url" : "",
            "profile_image_url" : "http://tp4.sinaimg.cn/1658122963/50/1282754213",
            "created_at" : "Tue Nov 03 00:00:00 +0800 2009",
            "province" : "11",
            "location" : "北京 朝阳区"
        },
        "status" : 
        {
            "created_at" : "Fri Dec 03 09:25:51 +0800 2010",
            "text" : "维基解密新主机被曝位于军事掩体内(图) http://sinaurl.cn/hbqEya",
            "bmiddle_pic" : "http://ww3.sinaimg.cn/bmiddle/63743d1cjw6dbz63h1rfrj.jpg",
            "original_pic" : "http://ww3.sinaimg.cn/large/63743d1cjw6dbz63h1rfrj.jpg",
            "truncated" : false,
            "in_reply_to_status_id" : "",
            "annotations" : 
            [

            ],
            "in_reply_to_screen_name" : "",
            "geo" : null,
            "user" : 
            {
                "name" : "赵海俊的微薄",
                "domain" : "",
                "geo_enabled" : true,
                "followers_count" : 315,
                "statuses_count" : 2984,
                "favourites_count" : 53,
                "city" : "5",
                "description" : "运动健将",
                "verified" : false,
                "id" : 1668562204,
                "gender" : "m",
                "friends_count" : 611,
                "screen_name" : "赵海俊的微薄",
                "allow_all_act_msg" : false,
                "following" : false,
                "url" : "http://blog.sina.com.cn/eshesoulheart",
                "profile_image_url" : "http://tp1.sinaimg.cn/1668562204/50/1279885528/1",
                "created_at" : "Thu Dec 10 00:00:00 +0800 2009",
                "province" : "11",
                "location" : "北京 朝阳区"
            },
            "favorited" : false,
            "thumbnail_pic" : "http://ww3.sinaimg.cn/thumbnail/63743d1cjw6dbz63h1rfrj.jpg",
            "in_reply_to_user_id" : "",
            "id" : 4046214423,
            "source" : "<a href=\"http://tech.sina.com.cn/\" rel=\"nofollow\">新浪科技</a>"
        }
    },
    {
        "id" : 4976262053,
        "text" : "有ZF 支持??",
        "created_at" : "Fri Dec 03 10:03:12 +0800 2010",
        "user" : 
        {
            "name" : "zhangwei217245",
            "domain" : "zhangwei217245",
            "geo_enabled" : true,
            "followers_count" : 22,
            "statuses_count" : 115,
            "favourites_count" : 3,
            "city" : "5",
            "description" : "ABCDE",
            "verified" : false,
            "id" : 1658122963,
            "gender" : "m",
            "friends_count" : 43,
            "screen_name" : "zhangwei217245",
            "allow_all_act_msg" : false,
            "following" : false,
            "url" : "",
            "profile_image_url" : "http://tp4.sinaimg.cn/1658122963/50/1282754213",
            "created_at" : "Tue Nov 03 00:00:00 +0800 2009",
            "province" : "11",
            "location" : "北京 朝阳区"
        },
        "status" : 
        {
            "created_at" : "Fri Dec 03 09:25:51 +0800 2010",
            "text" : "维基解密新主机被曝位于军事掩体内(图) http://sinaurl.cn/hbqEya",
            "bmiddle_pic" : "http://ww3.sinaimg.cn/bmiddle/63743d1cjw6dbz63h1rfrj.jpg",
            "original_pic" : "http://ww3.sinaimg.cn/large/63743d1cjw6dbz63h1rfrj.jpg",
            "truncated" : false,
            "in_reply_to_status_id" : "",
            "annotations" : 
            [

            ],
            "in_reply_to_screen_name" : "",
            "geo" : null,
            "user" : 
            {
                "name" : "赵海俊的微薄",
                "domain" : "",
                "geo_enabled" : true,
                "followers_count" : 315,
                "statuses_count" : 2984,
                "favourites_count" : 53,
                "city" : "5",
                "description" : "运动健将",
                "verified" : false,
                "id" : 1668562204,
                "gender" : "m",
                "friends_count" : 611,
                "screen_name" : "赵海俊的微薄",
                "allow_all_act_msg" : false,
                "following" : false,
                "url" : "http://blog.sina.com.cn/eshesoulheart",
                "profile_image_url" : "http://tp1.sinaimg.cn/1668562204/50/1279885528/1",
                "created_at" : "Thu Dec 10 00:00:00 +0800 2009",
                "province" : "11",
                "location" : "北京 朝阳区"
            },
            "favorited" : false,
            "thumbnail_pic" : "http://ww3.sinaimg.cn/thumbnail/63743d1cjw6dbz63h1rfrj.jpg",
            "in_reply_to_user_id" : "",
            "id" : 4046214423,
            "source" : "<a href=\"http://tech.sina.com.cn/\" rel=\"nofollow\">新浪科技</a>"
        }
    }
]

Others

None