I am trying to integrate google latitute in iphone,
1. I created a projected with google latitude service and created a client secret.
2. I am using oAuthConsumer to get Access Key as follows
OAConsumer *consumer = [[OAConsumer alloc] initWithKey:@"App key goes here" secret:@"client secret goes here"]; OAMutableURLRequest *request = [[[OAMutableURLRequest alloc] initWithURL:url consumer: consumer token:token realm:nil signatureProvider: nil] autorelease]; if (!request) return; [request setOAuthParameterName:@"scope" withValue:@"https://www.googleapis.com/auth/latitude"]; [request setOAuthParameterName:@"oauth_callback" withValue:@"http://someURL"]; [request setHTTPMethod: @"POST"]; OADataFetcher *fetcher = [[[OADataFetcher alloc] init] autorelease]; [fetcher fetchDataWithRequest: request delegate: self didFinishSelector: success didFailSelector: fail];
The problem is in the success delegate instead of oauth token i'm getting the respose as
Consumer is not registered: App-key
So is there a mistake in the above request,
if not how to register the google api application
Thanks in advance
We should add a domain and register to programmatically access Google data on behalf of your users. And in the above code the scope and oauth_callback parameter should be in the URl instead of request Header