IOS Twitter API How to get the latest tweets domestically?

I am new to the Twitter and iOS APIs, but after reading the documentation, I learned how to use "Twitter.framework" in xCode and the "TWRequest" class in a specific one.

The most obvious way would be to make a request:

GET statuses/public_timeline 

However, this request does not allow the parameter to indicate latitude and longitude in order to receive the latest publicly available tweets within the country. I found:

 GET geo/search 

This allows me to set all such cool options like lat, long and granularity, but unfortunately it does not return tweets in the results.

So maybe? Or the lost value?


Edit:

So, I think I should use:

 GET search 

But the only drop is that I have to give q (query), a search query, but I am not looking for a specific term. I just want to get the latest public tweets in this country. So it is, and should I use a wildcard?

+2
ios frameworks twitter local tweets
source share
1 answer

First make a request:

 GET geo/search 

Get the place id. For The Netherlands identifier is 879d7cfc66c9c290 .

Then do a search query:

 GET search 

With the request:

 q=place:{PLACE_ID} 

Example: "q = place: 879d7cfc66c9c290"

If you like getting the latest data, you can also set the result_type parameter and set it to recent and it. Hope this helps people.

+2
source share

All Articles