【问题标题】:Restful issue with twitter public timelineTwitter公共时间线的宁静问题
【发布时间】: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 有关。

标签: java rest twitter


【解决方案1】:

Twitter 不再提供对公共时间线的 RESTful 访问。

所有他们的请求需要身份验证。

查看他们的 API 文档https://dev.twitter.com/docs/api/1.1

【讨论】:

    猜你喜欢
    • 2011-05-26
    • 2014-05-18
    • 2012-05-27
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多