Issue with Track not appearing to work with streaming api?


#1

I am trying to track a text string, e.g. “Vancouver”, for tweets that fall inside a particular latitude/longitude bounding box.
I am able to access the streaming api and get tweets back when I set ‘locations’ with latitude/longitude coordinates, and I have track=Vancouver, BUT when I look at the tweets that are extracted, they may or may not have the word “Vancouver”.
So I tried dropping ‘locations’ and just keeping ‘track’, but when I do this, nothing comes back. Here is my URL. Any idea what could be the problem?

https://stream.twitter.com/1.1/statuses/filter.json?track=Vancouver&locations=-123.04%2C49%2C-122.4%2C49.4


#2

The locations and track parameters don’t work the way you think. It’s not an AND relationship but an OR relationship. When you use both parameters together you will get tweets that match the locations you specify OR match the tracking words you specify.


#3

Thanks @boxnumber03, would you mind suggesting an alternative to implement the AND objective here?

Cheers!


#4

Initiate the streaming request by specifying only the locations parameter. As you processes each returned status, throw out those statuses that do not contain “Vancouver” in the text field.


#5

Makes sense now, thank you!