8

I have started learning Twitter4j API and have got all credentials and tokens from Twitter to use it. I am using twitter4j API version 2.2.5.

I am able to get my own timeline using a simple java program and print it on console. I am able to get all the tweets and retweets done by me using the code below.

List<Status> statuses;
statuses = twitter.getUserTimeline();
for (Status status1 : statuses){
   System.out.println(status1.getText());
}

The problem is I retweeted one tweet which consists of 140 characters, so after the retweet it becomes more than 140 characters. It is not printing the whole tweet in the console, instead it is printing ... at the end.

 RT @xxxxxx: The ************************************ , but the pai.....

How I can get the whole tweet?

Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
vikiiii
  • 9,246
  • 9
  • 49
  • 68

1 Answers1

1

Based on Twitter4J's Status Javadoc, I would try this:

status1.getRetweetedStatus().getText()
anon
  • 4,163
  • 3
  • 29
  • 26