Twitter search api always return geo="<null>"


#1

Hi, I’m the builder of tweet map app (https://itunes.apple.com/us/app/tweetmap-for-iphone/id1033296267?mt=8)

Last week and months ago it used to return with the geo data of the tweets. I search the tweets using this code from wrapper, STTwitter

[_twitter getSearchTweetsWithQuery:@"" geocode:geocodeString lang:@"" locale:@"" resultType:@"recent" count:@"1000"until:@"" sinceID:@"" maxID:@"" includeEntities:false callback:@"" successBlock:^(NSDictionary *searchMetadata, NSArray *statuses) {
 
} errorBlock:^(NSError *error) {

}];

Since last week, all the tweets return with geo="" even i tried with my own tweet with location enable, my own tweet does not have geo data in it.

Is this the issue from twitter side? Or are there some changes in the api?

Cheers,
Pung


#2

geo is deprecated. It’s documented here.


#3

That may be true but the issue still applies to the ‘coordinates’ field which that documented link refers to.

More specifically, the geo/coordinates field is usually ‘null’ with larger radius (4km+); returning only 0-1% tweets with geotagged data. Smaller radius 1-3km usually returns 70-100% tweets with geotagged data and fully populated coordinate and geo fields.

At present there is no reliable way to return geotagged tweets.

I hope this is an issue at Twitter’s end rather than a change in functionality, but yet to hear from Twitter on the matter.

A number of people are having the same issue:


#4

Hey man, thanks for the reply. yeah, I have the same issue. I think they change how search results return when query for geolocation. Any work around for this case?

Cheers


#5

Yes, the coordinates field is where you would expect the geolocation data to appear. And, yes, the number of tweets that carry this data has been drastically reduced. I think prior to some time last year, you might if you were lucky see geolocation data in coordinates about 2% of the time. Since then, that percentage has dropped to some minuscule number. There was a post on the forum that stated that the place field was now being preferred over coordinates because it provides more anonymity. The place field contains a bounding box, so not as useful for mapping a point location.


Geolocated tweets
#6

I agree, that seems to be what is happening, with the fallback user->location being used (‘place’ field also null). However it is inconsistent in how it falls back. Up to 3km (multiple locations) I get 75%+ only geolocated tweets returned with the coordinates field, anything higher it drops of to 1% if I’m lucky (with everything else using place field)

I understand the anonymity argument, and I already obscure marker placements when visualising on the map for example, but for my app (https://socialbearing.com/geo) and many others, the place field is next to useless. For example trying to return tweets from an actual event/gig/festival/sporting match/protest march etc - there are so many useful applications - we would want to see tweets from these locations, rather than tweets using people’s profile location - they could be anywhere in the world at the time of tweeting and profile locations tend to centre on a city centre like ‘London’ rather than anywhere close to where the person is actually tweeting from

Also, using the user->location field e.g. ‘London, UK’, I would have to do a separate GEO lookup. Doing this on 100’s tweets individually isn’t exactly feasable


#7

Finally, I got it work by reduce the radius to 1 miles, it return around 75% of data which as coordinates data in it… it’s not the best but kinda get the job done… I really wish twitter will be more open in the future for geo search tweets :-/


#8

HI, how did you get it to work in the end? I’m very curious. As in what was your full URL when performing the GET request? By URL I mean like I have been using this one to display my own tweets on my site: https://api.twitter.com/1.1/statuses/user_timeline.json so if you would be kind enough to let me know how you did it and how you narrowed it down that would be great dude! Thanks and kudos on managing to figure it out.