简体   繁体   English

Twitter4j截断推文

[英]Twitter4j Truncating Tweets

I am currently making a test application to retrieve tweets from a Twitter account and display them on the screen. 我目前正在开发一个测试应用程序,以从Twitter帐户检索推文并将其显示在屏幕上。

All my code is working fine, but a few Tweets are being truncated. 我所有的代码工作正常,但是一些Tweets被截断了。

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: Twitter帐户:

https://twitter.com/USU_Unitec https://twitter.com/USU_Unitec

Example of Tweets being truncated: 推文被截断的示例:

Did you catch Aaradhna on Good Morning today? 您今天早上好赶上Aaradhna吗? What did you think? 你觉得呢? We were pretty blown away... Check out her... http ... 我们被吹走了...看看她... 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 ... @USU_Unitec USU你们好照顾我们的学生,如果我在校园里我会来拿到它,但是我正在休假...

A reminder to check out our Summer School courses. 提醒您查看我们的暑期学校课程。 You don't need to be studying full time to get ahead! 您无需全职学习就可以取得成功! http://tc ... http:// tc ...

Why not use the Twitter JSON or XML API call directly? 为什么不直接使用Twitter JSON或XML API调用? with this you can fetch all Tweets in full length :) 有了这个,你可以获取所有的Tweets的完整长度:)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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