Esempio n. 1
0
 public static void main(String[] args) throws InterruptedException {
   twitter = new AsyncTwitterFactory().getInstance();
   twitter.addListener(new MyTwitterAdapter());
   for (int page = 1; page <= 100; page++) {
     Paging paging = new Paging(page, 200);
     twitter.getUserTimeline(paging);
     synchronized (LOCK) {
       LOCK.wait();
     }
   }
 }
Esempio n. 2
0
  /** {@inheritDoc} */
  @Override
  public void getFeed(Boolean fromStart, final SocialCallbacks.FeedListener feedListener) {
    if (!isInitialized) {
      return;
    }

    SoomlaUtils.LogDebug(TAG, "getFeed");

    RefProvider = getProvider();
    RefFeedListener = feedListener;

    preformingAction = ACTION_GET_FEED;

    try {
      if (fromStart) {
        this.lastFeedCursor = 1;
      }

      Paging paging = new Paging(this.lastFeedCursor, PAGE_SIZE);
      twitter.getUserTimeline(paging);
    } catch (Exception e) {
      failListener(ACTION_GET_FEED, e.getMessage());
    }
  }