How to use Get statuses/show id api using Java?


Hi everyone,

I am new to Twitter API and I am working on a project which is based on Twitter analysis. I have a list of tweets and I select one tweet at time and see whether it is a reply to any tweet or not. For that I already have in_reply_to_status_id. Now I want to use this show id api by using in_reply_to_status_id.

Could anyone provide me the example that how to do it? Any ideas?

I really need help!



For Java, Twitter4J is a good library to use.

There’s a /statuses/show:id example here:

If you already have the tweet json, you can create Twitter4J status objects like this:

Status tweet = TwitterObjectFactory.createStatus(jsonString);

use tweet.getInReplyToStatusId() to get in_reply_to_status_id

If you have lots of tweets, you can gather those ids in batches of 100 and use…- to get them all faster.


Thank you so much for helping me out here!! :smiley: