I want to find out if my followers follow each other using Twitter4j, and build a graph from this. I have Two questions:
My first Question: How do I get this data?
Second Question: How do I visualise this on to a graph with nodes and vertices to show how connected my network is?
Ive tried to get my followers followers who are following me:
Twitter twitter = new TwitterFactory().getInstance();
User u1 = null ;
long cursor = -1;
IDs ids;
System.out.println("Listing followers's ids.");
do {
ids = twitter.getFollowersIDs("2289869045", cursor);
for (long id : ids.getIDs()) {
System.out.println(id);
User user = twitter.showUser(id);
System.out.println(user.getName());
}
} while ((cursor = ids.getNextCursor()) != 0);
}
But this doesnt even work right now.
Any suggestions?