Twitter Streaming API - tracking exact multiple keywords in exact order

本秂侑毒 提交于 2019-12-22 09:02:22

问题


I'm just beginning to play with the Twitter Streaming API.

If I specify

$sc->setTrack(array('just bought from'));

This will correctly pull only tweets that have all 3 keywords - but doesn't maintain the order.

1) I want the keywords to appear in the same order like

"I just bought apple from itunes" 

but the above also returns tweets like

"I bought some apples and just removed them from the bag"

2) Is there a way to specify the exact words say "NBA basketball" with nothing in between - in the sense I dont want tweets like this to be returned

Watching basketball on NBA tv

I just want tweets which contain the exact phrase to be returned like

I love watching NBA basketball

3) Also is there a way to specify negative keywords

Any tips if this is possible. Thanks


回答1:


Currently the answer to all three questions is no. The general recommendation is to do this post processing on your side. The negative keyword is something that's been asked for quite a bit, but currently we don't have a scheme that would let us support this in a scalable way



来源:https://stackoverflow.com/questions/2769154/twitter-streaming-api-tracking-exact-multiple-keywords-in-exact-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!