Java twitter公共时间线的Restful问题
我目前正在学习RESTful,我遇到了这个例子Java twitter公共时间线的Restful问题,java,rest,twitter,Java,Rest,Twitter,我目前正在学习RESTful,我遇到了这个例子 URL twitter = new URL("https://api.twitter.com/1/statuses/user_timeline/$userid.xml?count=1&include_rts=1callback=?"); URLConnection tc = twitter.openConnection(); in = new BufferedR
URL twitter = new
URL("https://api.twitter.com/1/statuses/user_timeline/$userid.xml?count=1&include_rts=1callback=?");
URLConnection tc = twitter.openConnection();
in = new BufferedReader(new
InputStreamReader(tc.getInputStream()));
String line;
// Write each line in the rectangle.
// Note that we are likely to have more lines than
//rectangle, but
// it's OK
int lineCount = 1;
int yOffset = 20;
while ((line = in.readLine()) != null) {
lineCount++;
System.out.println(line);
}
我遇到的问题是,我在书中找到的url已经过时,他们没有使用它
有没有其他url,我可以使用Twitter API获取最近20条推文
PS:我只是在寻找一个新的URL来使用,除此之外,Twitter不再提供对公共时间线的RESTful访问 他们的所有请求都需要身份验证
查看他们的API文档这不是编程问题。这完全与twitter有关。