Grab recent tweets from several users at once

46 Views Asked by At

Currently using Twitter4J, im able to grab the timeline for a single user using the following:

AsyncTwitterFactory factory = new AsyncTwitterFactory(cb.build());
    AsyncTwitter asyncTwitter = factory.getInstance();
    asyncTwitter.addListener(new TwitterAdapter() {

        @Override
        public void gotUserTimeline(ResponseList<Status> statuses) {
            for (Status status : statuses) {
                Log.d("twitter", "twitter: " + status.getText() + status.getUser().getName());
            }
            onDataLoaded(twitterItemsToNative(statuses));
            super.gotUserTimeline(statuses);
        }
    });

    asyncTwitter.getUserTimeline("twitter");

What I would like to do, is grab the recent tweets/timelines from several different users at once. I know I could just run the previous network call multiple times for different users, but obviously this seems like bad practice and id like to find a different way.

0

There are 0 best solutions below