twitter4j.Twitter.destroyStatus()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中twitter4j.Twitter.destroyStatus()方法的一些代码示例,展示了Twitter.destroyStatus()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Twitter.destroyStatus()方法的具体详情如下:
包路径:twitter4j.Twitter
类名称:Twitter
方法名:destroyStatus

Twitter.destroyStatus介绍

[英]Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status.
This method calls http://twitter.com/statuses/destroy
[中]销毁所需ID参数指定的状态。身份验证用户必须是指定状态的作者。
此方法调用http://twitter.com/statuses/destroy

代码示例

代码示例来源:origin: org.twitter4j/twitter4j-async

@Override
  public void invoke(List<TwitterListener> listeners) throws TwitterException {
    Status status = twitter.destroyStatus(statusId);
    for (TwitterListener listener : listeners) {
      try {
        listener.destroyedStatus(status);
      } catch (Exception e) {
        logger.warn("Exception at destroyStatus", e);
      }
    }
  }
});

代码示例来源:origin: org.mule.modules/mule-module-twitter

/**
 * Destroys the status specified by the required ID parameter.<br>
 * Usage note: The authenticating user must be the author of the specified
 * status. <br>
 * This method calls http://api.twitter.com/1.1/statuses/destroy
 * <p/>
 * {@sample.xml ../../../doc/twitter-connector.xml.sample twitter:destroyStatus}
 *
 * @param statusId The ID of the status to destroy.
 * @return the deleted {@link Status}
 * @throws TwitterException when Twitter service or network is unavailable
 * @see <a href="http://dev.twitter.com/doc/post/statuses/destroy/:id">POST
 * statuses/destroy/:id | dev.twitter.com</a>
 */
@Processor
public Status destroyStatus(long statusId) throws TwitterException {
  return getConnectionManagement().getTwitterClient().destroyStatus(statusId);
}

相关文章