To get followers of a given user using their screen name, see Twitter#getFollowersList() , for example:
long cursor = -1; PagableResponseList<User> followers; do { followers = twitter.getFollowersList("screenName", cursor); for (User follower : followers) { // TODO: Collect top 10 followers here System.out.println(follower.getName() + " has " + follower.getFollowersCount() + " follower(s)"); } } while ((cursor = followers.getNextCursor()) != 0);
I used the cursor to retrieve all subscribers, by default the api call returns only twenty - see the Twitter guide on Using cursors for navigation for more information.
Inside the loop, you can collect your βtop 10β followers by checking the follow-up count.
source share