Twitter API 是否允许按用户名和主题标签过滤? [英] Does the Twitter API allow filtering by username AND hashtag?

查看:53
本文介绍了Twitter API 是否允许按用户名和主题标签过滤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以获取使用特定主题标签的特定用户的所有推文吗?

Can I get all the tweets of a particular user, in which a particular hashtag is used?

我可以只获取过去的 100 条推文,然后在我的一端过滤它们,但如果 Twitter 可以在它们的一端进行过滤会方便得多.

I could just get the past 100 tweets then filter them on my end, but it would be much more convenient if Twitter could do the filtering on their end.

这可能吗?

推荐答案

Twitter 的高级搜索让您构建您想要的查询.不幸的是,搜索结果似乎只针对过去 24 小时内发布的推文;可能只是暂时的限制,不确定.

Twitter's Advanced Search lets you construct the query you desire. Unfortunately, search results only seem to be for tweets posted within the past 24 hours or so right now; might just be a temporary limitation, not sure.

无论如何,您的请求 URL 可能如下所示(注意 JSON 和 Atom 类型):

In any case, your request URL might look something like this (note the JSON and Atom types):

http://search.twitter.com/search?q=%23HASHTAG+from:USERNAMEhttp://search.twitter.com/search.json?q=%23HASHTAG+from:USERNAMEhttp://search.twitter.com/search.atom?q=%23HASHTAG+from:USERNAME

但由于目前的时间限制,这不是很实用.

But with the current timeframe limitation, it's not very practical.

这篇关于Twitter API 是否允许按用户名和主题标签过滤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆