views:

145

answers:

1

Using Matt Gemmell's MGTwitterEngine, how would I find out if the user (that i'm logged in as) has geo tagging enabled? According to the Twitter API, there is a 'geo_enabled' boolean flag, but I can't work out how to interrogate it using MGTwitterEngine. http://apiwiki.twitter.com/Geotagging-API-Best-Practice

+1  A: 

You can do getUserInformationFor: on the current user and check if string for key "geo_enabled" is equal to string "true", as in [[userInfo objectForKey:@"geo_enabled"] isEqualToString:@"true"];

freeatnet
Not sure how to do this, I'm trying:NSString *theName = [_engine username];NSLog(@"Name %@", theName);NSString *theInfo = [_engine getUserInformationFor:theName];NSLog(@"Info %@", theInfo);.. but theInfo just returns a random string, like A2B6D0D5-A579-4122-831A-B3355242B684.
cannyboy
You will need to implement userInfoReceived:forRequest: in your engine delegate. Once the result for your getUserInformationFor: request is ready and parsed, the engine will call userInfoReceived:forRequest: with the first argument of NSArray of NSDictionary-ies with user info and NSString, containing the same ID as you get as getUserInformationFor's return value.
freeatnet