/** * Returns a list of id of the users the configured account follows. Returns null in case of * error. */ public ArrayList<Long> getFollowing() { ArrayList<Long> following = new ArrayList<Long>(); try { long lCursor = -1; IDs friendsIDs = twitter.getFriendsIDs(twitter.getId(), lCursor); do { for (long i : friendsIDs.getIDs()) { following.add(i); } } while (friendsIDs.hasNext()); return following; } catch (Exception ex) { System.err.println("[ERROR] Can't get following users."); ex.printStackTrace(); return null; } }