Statuses/comment destroy

跳转到: 导航, 搜索

目录

statuses/comment_destroy

删除微博。注意:只能删除自己发布的信息。

URL

http://api.t.sina.com.cn/statuses/comment_destroy/id.format

格式

xml, json

HTTP请求方式

POST, DELETE

是否需要身份验证

true

请求数限制

false

请求参数

  • id. 必须参数. 要删除的微博ID.

o Example: http://api.t.sina.com.cn/statuses/comment_destroy/12345.xml

使用说明

  • 如果参数错误,将返回500错误

返回

XML示例:

<?xml version="1.0" encoding="UTF-8"?>
<comment>
   <created_at>Mon Dec 28 10:39:24 +0800 2009</created_at>
   <id>40406</id>
   <text>欢迎使用微博API</text>
   <source>
     <a id="0" href="http://t.sina.com.cn">Web</a>
   </source>
   <user>
     <id>11075</id>
     <screen_name>name_11075</screen_name>
     <name>name_11075</name>
     <province></province>
     <city></city>
     <location></location>
     <description></description>
     <profile_image_url>http://tp4.sinaimg.cn/11075/50/0</profile_image_url>
     <domain>11075</domain>
     <gender></gender>
     <email></email>
     <qq>1817</qq>
     <msn>msn_1817</msn>
     <followers_count>22</followers_count>
     <friends_count>30</friends_count>
     <statuses_count>0</statuses_count>
     <favourites_count>0</favourites_count>
     <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
     <following>false</following>
     <verified>false</verified>
     <geo_enabled>false</geo_enabled>
   </user>
   <status>
     <created_at>Mon Dec 28 10:37:59 +0800 2009</created_at>
     <id>19105</id>
     <text>测试中国</text>
     <source>
       <a id="0" href="http://t.sina.com.cn">Web</a>
     </source>
     <favorited>false</favorited>
     <truncated>false</truncated>
     <geo/>
     <in_reply_to_status_id></in_reply_to_status_id>
     <in_reply_to_user_id></in_reply_to_user_id>
     <in_reply_to_screen_name></in_reply_to_screen_name>
     <user>
       <id>11075</id>
       <screen_name>name_11075</screen_name>
       <name>name_11075</name>
       <province></province>
       <city></city>
       <location></location>
       <description></description>
       <profile_image_url>http://tp4.sinaimg.cn/11075/50/0</profile_image_url>
       <domain>11075</domain>
       <gender></gender>
       <email></email>
       <qq>1817</qq>
       <msn>msn_1817</msn>
       <followers_count>22</followers_count>
       <friends_count>30</friends_count>
       <statuses_count>0</statuses_count>
       <favourites_count>0</favourites_count>
       <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
       <following>false</following>
       <verified>false</verified>
       <geo_enabled>false</geo_enabled>
     </user>
   </status>
 </comment>

使用示例

cURL:

  • xml:

curl -u user:password --http-request DELETE http://api.t.sina.com.cn/statuses/comment_destroy/1472669360.xml

  • json:

curl -u user:password --http-request DELETE http://api.t.sina.com.cn/statuses/comment_destroy/1472669360.json