Php Twitter搜索API,如何按@username过滤?

Php Twitter搜索API,如何按@username过滤?,php,twitter,Php,Twitter,我使用的是Twitter API atom格式 http://search.twitter.com/search.atom?lang=en&q=some_hashtag 但它是用所有人的标签“some_hashtag”回复我的推特。我正在寻找一些过滤器来搜索只有一个用户的所有带有“some_hashtag”标签的tweet,例如@this_one 我在“”文档中未找到此参数查看这两页: 推特不允许您搜索特定用户组的关键字 由于您只“搜索”一个用户的推文,我建议您只需使用include

我使用的是Twitter API atom格式

http://search.twitter.com/search.atom?lang=en&q=some_hashtag
但它是用所有人的标签“some_hashtag”回复我的推特。我正在寻找一些过滤器来搜索只有一个用户的所有带有“some_hashtag”标签的tweet,例如@this_one


我在“”文档中未找到此参数查看这两页:


推特不允许您搜索特定用户组的关键字

由于您只“搜索”一个用户的推文,我建议您只需使用
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...
    }
}

编辑:虽然这仍然有效,我建议看看这个

您必须为
q
from:
提供一个额外的参数

例如,通过
@victimcomunity
检索hashtag
一些hashtag
的推文:

http://search.twitter.com/search.atom?lang=en&q=some_hashtag%20from:VictimCommunity
书中有描述,但有点隐蔽