【问题标题】:Error n tweets were requested but the API can only return 0请求了错误 n 条推文,但 API 只能返回 0
【发布时间】:2017-02-20 21:09:24
【问题描述】:

我无法使用 R 中的 twitteR 包检索任何推文。例如此请求:

nbahash_tweets = searchTwitter("#nba",since='2013-01-01', until='2014-02-25',n=20)

向我显示此警告消息:

警告信息:在 doRppAPICall("search/tweets", n, params = params, retryOnRateLimit = retryOnRateLimit, : 请求了 20 条推文,但 API 只能返回 0

问题的原因可能是什么?

【问题讨论】:

    标签: r api twitter


    【解决方案1】:

    来自官方 Twitter 搜索 API 文档

    https://dev.twitter.com/rest/public/search

    Twitter 搜索 API 根据过去 7 天内发布的近期推文样本进行搜索。

    因此您无法在 API 中搜索 2013 - 2014 年的推文

    【讨论】:

      【解决方案2】:

      当我尝试使用 twitteR 包搜索 Twitter 时,我也收到了这条消息——这让我看到了这篇文章。 但是,当我在同一个包中使用 search_twitter_and_store 命令时,我能够检索 1702 条消息并将它们存储在 MySQL 中。不完全是我的目标,但它确实让我能够获取和操作数据。也可能对你有用。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-10-06
        • 2023-03-06
        • 1970-01-01
        • 2022-01-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多