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

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

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

Twitter.getPublicTimeline介绍

[英]Returns the 20 most recent statuses from non-protected users who have set a custom user icon.
This method calls http://twitter.com/statuses/public_timeline
[中]返回设置了自定义用户图标的非受保护用户最近的20种状态。
此方法调用http://twitter.com/statuses/public_timeline

代码示例

代码示例来源:origin: net.homeip.yusuke/twitter4j

/**
 * Returns only public statuses with an ID greater than (that is, more recent than) the specified ID.
 * <br>This method calls http://twitter.com/statuses/public_timeline
 *
 * @param sinceID returns only public statuses with an ID greater than (that is, more recent than) the specified ID
 * @return the 20 most recent statuses
 * @throws TwitterException when Twitter service or network is unavailable
 * @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-public_timeline">Twitter API Wiki / Twitter REST API Method: statuses public_timeline</a>
 * @deprecated use getPublicTimeline(long sinceID) instead
 */
public List<Status> getPublicTimeline(int sinceID) throws
    TwitterException {
  return getPublicTimeline((long)sinceID);
}
/**

代码示例来源:origin: stackoverflow.com

try {
  List<Status> statuses = unauthenticatedTwitter
      .getPublicTimeline();
  for (Status status : statuses) {
    System.out.println(status.getUser().getName() + ":"

代码示例来源:origin: net.homeip.yusuke/twitter4j

System.out.println("Showing public timeline.");
try {
  List<Status> statuses = unauthenticatedTwitter.getPublicTimeline();
  for (Status status : statuses) {
    System.out.println(status.getUser().getName() + ":" +

相关文章