本文整理了Java中twitter4j.Twitter.getRetweets()
方法的一些代码示例,展示了Twitter.getRetweets()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Twitter.getRetweets()
方法的具体详情如下:
包路径:twitter4j.Twitter
类名称:Twitter
方法名:getRetweets
[英]Returns up to 100 of the first retweets of a given tweet.
This method calls http://twitter.com/statuses/retweets
[中]返回最多100条给定推文的第一次转发。
此方法调用http://twitter.com/statuses/retweets
代码示例来源:origin: org.twitter4j/twitter4j-async
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
ResponseList<Status> statuses = twitter.getRetweets(statusId);
for (TwitterListener listener : listeners) {
try {
listener.gotRetweets(statuses);
} catch (Exception e) {
logger.warn("Exception at getRetweets", e);
}
}
}
});
代码示例来源:origin: org.mule.modules/mule-module-twitter
/**
* Returns up to 100 of the first retweets of a given tweet. <br>
* This method calls http://api.twitter.com/1.1/statuses/retweets
* <p/>
* {@sample.xml ../../../doc/twitter-connector.xml.sample twitter:getRetweets}
*
* @param statusId The numerical ID of the tweet you want the retweets of.
* @return the retweets ({@link Status}) of a given tweet
* @throws TwitterException when Twitter service or network is unavailable
* @see <a href="http://dev.twitter.com/doc/get/statuses/retweets/:id">Tweets
* Resources > statuses/retweets/:id</a>
* @since Twitter4J 2.0.10
*/
@Processor
public ResponseList<Status> getRetweets(long statusId) throws TwitterException {
return getConnectionManagement().getTwitterClient().getRetweets(statusId);
}
内容来源于网络,如有侵权,请联系作者删除!