Here's a code I'm using in welshare
The first part gets all the tweets that twitter is displaying below the tweet, when it is opened. The rest takes care of conversations, in case the tweet is a reply to some other tweet.
RelatedResults results = t.getRelatedResults(tweetId);
List<Status> conversations = results.getTweetsWithConversation();
/////////
Status originalStatus = t.showStatus(tweetId);
if (conversations.isEmpty()) {
conversations = results.getTweetsWithReply();
}
if (conversations.isEmpty()) {
conversations = new ArrayList<Status>();
Status status = originalStatus;
while (status.getInReplyToStatusId() > 0) {
status = t.showStatus(status.getInReplyToStatusId());
conversations.add(status);
}
}
// show the current message in the conversation, if there's such
if (!conversations.isEmpty()) {
conversations.add(originalStatus);
}
EDIT: This wont work anymore as Twitter API v 1 is now not in use
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…