简体   繁体   中英

Twitter4j Truncating Tweets

I am currently making a test application to retrieve tweets from a Twitter account and display them on the screen.

All my code is working fine, but a few Tweets are being truncated.

Anyone aware of what might be causing this and how to fix it?

Code for retrieving tweets:

Twitter twitter = new TwitterFactory().getInstance();
List<Status> statuses = null;
try 
{
    statuses = twitter.getUserTimeline("usu_unitec");
} 
catch (TwitterException e) 
{
    e.printStackTrace();
}
ArrayList<String> news = new ArrayList<String>();
for (Status status : statuses) 
{
    news.add(status.getText());
}
return news;

Twitter account:

https://twitter.com/USU_Unitec

Example of Tweets being truncated:

Did you catch Aaradhna on Good Morning today? What did you think? We were pretty blown away... Check out her... http ...

@USU_Unitec USU yous are awesome looking after us students , if I was on campus I'd come and get it , but I'm on study leave ...

A reminder to check out our Summer School courses. You don't need to be studying full time to get ahead! http://tc ...

Why not use the Twitter JSON or XML API call directly? with this you can fetch all Tweets in full length :)

https://dev.twitter.com/docs/api/1/get/statuses/user_timeline

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM