Get tweets by location


#1

Hi,

I’m struggling to figure out how to do something which I imagine is quite simple.

I am trying to get the latest 100 tweets from my local town in the UK.

When i use search/tweets, i can specify my geocode (lat, long, radius) and count, but i also have to specify a query? I don’t want to specify a query as i am not filtering the tweets, i want all tweets? Can i pass an empty query?

I’ve looked at geo/search where I’ve found the id for my town and then searched it using geo/id but this only returns info about that place and not the tweets?

I am using .Net and LINQ To Twitter to query the api.

Any help will be greatly appreciated.

Many thanks,
Mike


#2

Hi Mike,

Indeed, a query is required on [node:10287]. For what you are trying to achieve, I would recommend using [node:10389]. Using this Streaming endpoint, you can describe a bounding box with coordinates with the locations parameter, and once connected you will receive Tweets posted in this location as they happen in real-time.

Let us know if this helps.


#3

Hi Romain,

Thanks for your response.

I have the stream working. Is there a way to get all previous tweets throughout the day and not only the real time tweets?

Also i posted a tweet and it hasnt been returned in my stream yet, how long does it take to be returned?

Thanks,
Mike