2

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

cannyboy
  • 24,180
  • 40
  • 146
  • 252

1 Answers1

2

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
  • 104
  • 7
  • 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 Apr 18 '10 at 13:40
  • 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 Apr 18 '10 at 19:06