【问题标题】:Twitter Search api - Tweets containing url are not returned in search resultTwitter Search api - 搜索结果中不返回包含 url 的推文
【发布时间】:2017-10-29 13:35:49
【问题描述】:

我正在使用 twitter rest api 来阅读用户的 twitter 提要和搜索特定主题标签的推文。但是 twitter search api 不会在搜索结果中返回包含 url 的推文。

例如我有 2 条推文 a) #hashtag b) #hashtag http://google.co.in/

下面的 api 只返回搜索结果中的第一条推文 https://api.twitter.com/1.1/search/tweets.json?q=%23promojuice 搜索结果中不会返回包含任何 url 的推文。

有人知道吗?

【问题讨论】:

  • 欢迎来到 StackOverflow。请采取tour,学习提出好问题stackoverflow.com/help/how-to-ask,制作minimal reproducible example。 MCVE 应包括各种样本输入(说明所有方面)和所需的输出。您需要提供有关上下文/背景以及您已经尝试过的内容的更多信息。

标签: twitter


【解决方案1】:

这是因为 Twitter 搜索 API 有 7 天的限制。查看 API 文档

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

关键词是sampling,Twitter Search API 只返回他们认为相关的推文。

【讨论】:

    猜你喜欢
    • 2023-01-17
    • 1970-01-01
    • 2016-09-19
    • 2018-09-15
    • 1970-01-01
    • 2013-06-26
    • 2018-09-23
    • 2020-08-19
    • 1970-01-01
    相关资源
    最近更新 更多