【发布时间】:2014-09-06 19:26:51
【问题描述】:
我目前正在学习 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 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);
}
我遇到的问题是我在书中找到的网址已过时,他们没有使用它。
是否有任何其他网址可以让我使用 Twitter API 获取最新的 20 条推文?
PS:我只是在寻找一个新的URL来使用,没有别的
【问题讨论】:
-
这不是编程问题。这仅与 twitter 有关。