Phirehose setTrack不使用setLocation

时间:2015-01-23 13:57:14

标签: php twitter twitter-streaming-api phirehose

我正在使用Phirehose使用Twitter Streaming API来发送推文。我想用某些关键字来提取地理标记的推文,例如:

$sc->setLocations(array(array(-180,-90,180,90))); //any geotagged tweet
$sc->setTrack($sc->getKeywords());

getKeywords类函数如下所示:

public function getKeywords()
{
     $array = array('hurricane', 'flood', 'tornado','tsunami','earthquake');
     return $array; 
}

问题是,setLocation()似乎导致setTrack()无法使用这些关键字提取推文。如果我完全删除setLocation()setTrack()可以很好地删除关键字。有什么方法可以提取包含这些关键字的地理标记推文吗?

1 个答案:

答案 0 :(得分:1)

“轨道,跟随和位置字段应被视为与OR运算符组合.trace = foo& follow = 1234返回匹配”foo“或用户1234创建的推文。”

正如Twitter https://dev.twitter.com/streaming/reference/post/statuses/filter

中的人所说
相关问题