【问题标题】:How to search and filter tweetts using Twitter API?如何使用 Twitter API 搜索和过滤推文?
【发布时间】:2021-07-25 20:20:57
【问题描述】:

我正在探索如何使用截至撰写本文时新发布的 Twitter API 版本 2 搜索和过滤推文。此特定端点的文档可用here.

我尝试成功搜索以下查询:

https://api.twitter.com/2/tweets/search/recent?query=puppy 

由于我需要更具体,我查看了 v1.1 文档 for rules and filtering 并尝试查找包含小狗图像的推文 (filter:image) 并且没有转发推文 (-filter:retweets) 但我无法在 v2 中获得查询(最好) 或 v1.1 与邮递员一起工作,即使我尝试了 percent-encoding 的特殊字符。

从文档中我也不清楚(尽管在文档中提到)如何在查询 "37.781157,-122.398720,1mi" 中指定某个 language,如英语 (lang=english) 和某个 distance

有人知道如何将它传递到查询中吗?

【问题讨论】:

    标签: api twitter postman


    【解决方案1】:

    语言过滤器可以参考帖子

    https://community.postman.com/t/define-the-language-of-tweets/20643

    但我不确定图像过滤器。但最近,来自 Postman 的开发人员 sean.keegan 更多地谈论 Postman 中的 twitter API。请查看https://community.postman.com/search?q=twitterhttps://www.youtube.com/watch?v=ySbLo13Fk-c

    希望这些对你有帮助!!

    【讨论】:

      猜你喜欢
      • 2013-06-09
      • 1970-01-01
      • 1970-01-01
      • 2013-08-19
      • 1970-01-01
      • 2012-09-26
      • 2013-05-30
      • 1970-01-01
      • 2012-02-29
      相关资源
      最近更新 更多