Guest User

Untitled

a guest
Nov 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. try {
  2. Twitter twitter = new TwitterFactory().getInstance();
  3. long lCursor = -1;
  4. IDs friendsIDs = twitter.getFriendsIDs(user.getId(), lCursor);
  5. do {
  6. System.out.println("in do while iteration");
  7. for (long i : friendsIDs.getIDs()) {
  8. System.out.println("Follower ID #" + i);
  9. System.out.println(twitter.showUser(i).getName());
  10. }
  11. } while (friendsIDs.hasNext());
  12. } catch (TwitterException te) {
  13. te.printStackTrace();
  14. System.out.println("Failed to get friends' ids: " + te.getMessage());
  15. System.exit(-1);
  16. }
Add Comment
Please, Sign In to add comment