Twitter Status Get


#1

Hey guys. So I was successful in getting the API to spit out my own tweets, but I’m not sure how to get it to spit out other people’s like my followers?

Any ideas, I’m using Twitter4j and Eclipse with a GetUserStatus class.

import twitter4j.Paging;
import twitter4j.ResponseList;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;

public class GetUserStatus {
	public static void main(String[] args){
		Twitter twitter = new TwitterFactory().getInstance();

                twitter.setOAuthConsumer("my_key","my_secret");
		twitter.setOAuthAccessToken(new AccessToken("auth_key","auth_secret"));

                try {
			ResponseList<Status> a = twitter.getUserTimeline(new Paging(1,5));
			
			for (Status b: a){
				System.out.println(b.getText());
			}
		}catch(Exception e){
		
		}
	}
}

What would I have to change in order to get 5 or so of my followers tweets?
Thanks
Z19


#2

Hi viewers, this has been solved. Could an admin set this to closed/solved please?

Thanks
Andrew