-(void)showGoogleLoginPage{
SEL finishedSelector = @selector(viewController:finishedWithAuth:error:);
GTMOAuth2ViewControllerTouch *authViewController =
[[GTMOAuth2ViewControllerTouch alloc] initWithScope:kGTLAuthScopeDrive
clientID:kClientID
clientSecret:kClientSecret
keychainItemName:userKeyChainName
delegate:self
finishedSelector:finishedSelector];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjects:[NSArray
arrayWithObjects:@"offline",@"force",@"en", nil] forKeys:[NSArray arrayWithObjects:@"access_type",@"approval_prompt",@"hl", nil]];
authViewController.signIn.shouldFetchGoogleUserProfile = YES;
authViewController.signIn.additionalAuthorizationParameters=params;
[self presentViewController:authViewController animated:YES completion:nil];
}
希望對你有所幫助..
你有沒有想過這個? – jj0b