Streaming API For a Determined City


#1

Hi, I’m using a Python’s Twitter API implementation, TwitterAPI.

I’m trying get tweets from a specific city (São Paulo), in the Twitter Advanced Search(https://twitter.com/search-advanced) website is easy, but when I try to do it using streaming, never returns any twitter.

Like follow the documentation I get the southwest coordinate first, and northeast after.

#!/usr/bin/python

import pprint
from TwitterAPI import TwitterAPI

    pp = pprint.PrettyPrinter(depth=6)
    
    api = TwitterAPI(CONSUMER_KEY,
                     CONSUMER_SECRET,
                     ACCESS_TOKEN_KEY,
                     ACCESS_TOKEN_SECRET)
    
    r = api.request('statuses/filter', {'locations':'-23.973,-46.944,-23.402289,-46.445610'})
    
    for item in r:
        pp.pprint(item)

But I never got any tweet, what I’am doing wrong ?