我使用的是Twitter API原子格式
http://search.twitter.com/search.atom?lang=en&q=some_hashtag
但这是所有人给我的带有"somehashtag"标签的推特。我正在寻找一些过滤器来搜索所有标签为"somehashtag"的推文,例如@this_one。
我在"twitter get search"文档上没有找到这个参数
您必须为q
:from:
提供一个额外的参数。
例如,通过@VictimCommunity
:检索标签some_hashtag
的推文
http://search.twitter.com/search.atom?lang=en&q=some_hashtag%20from:VictimCommunity
文档中有描述,但有点隐藏。
Twitter不允许您搜索特定用户组的关键字。
由于你只"搜索"一个用户的推文,我建议你只需用include_entities
阅读用户的时间线,并用PHP过滤结果
https://dev.twitter.com/docs/api/1/get/statuses/user_timeline?screen_name=this_one&include_entities=1
现在使用PHP通读。。。
foreach ($tweets as $tweet)
{
if (in_array('hashtag', $tweet->entities->hashtags))
{
// go...
}
}
编辑:虽然这仍然有效,但我建议看看上面的答案。
看看这两页:
Twitter搜索Api
Twitter搜索Api实体