Search code examples
javatwittertwitter4jstatus

How to test whether a tweet is the initiating tweet, instead of retweet in twitter4j?


I want to get whether a tweet is the initiating tweet, instead of re-tweet. How to know this in twitter4j after I get a "Status" object? Will status.getInReplyToUserId() return null? Thanks.


Solution

  • Oh, I printed out the return values. And found out some post have the following value: ReplyToStatusId:-1; InReplyToScreenName: null; InReplyToUserId:-1. I assume this tweet is an initating tweet.