Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试列出来自多个用户的推文。我有一个数组中的用户名,并且在 1.0 Twitter API 上一切正常,我使用的是类似的东西
http://search.twitter.com/search.json?q=from%3username1+OR+from%3username2
现在我尝试使用新的 1.1 查询字符串,但没有任何效果。
例如
https://api.twitter.com/1.1/search/tweets.json?q=from%3username
建议?
是的,你不能只改变字符串,就是这样;)
您需要发出经过身份验证的请求(OAuth)。
这篇文章将详细介绍如何使用 Oauth 向 1.1 API 发出经过身份验证的请求。
这篇文章虽然有点复杂,因为它涉及多个用户和多个主题标签,但它展示了如何在一个查询中加入多个用户(尽管看起来你已经掌握了这一点)。
您已经掌握了需要进行的实际查询的要点,因此在进行一些研究和阅读文档方面做得很好。但是,执行 1.1 请求现在涉及更多内容。