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(); } } }
/** {@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()); } }