Twitter Streaming API - tracking exact multiple keywords in exact order

Posted by Gublooo on Stack Overflow See other posts from Stack Overflow or by Gublooo
Published on 2010-05-04T21:37:58Z Indexed on 2010/05/05 20:18 UTC
Read the original article Hit count: 163

Filed under:
|
|

Hey Guys,

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

© Stack Overflow or respective owner

Related posts about twitter

Related posts about twitterapi