Hi guys,
I am working on access to Google Calendar to retrieve events from a user specified google account.
When my APP knows which user's account it is trying to authenticate, how can I provide this parameter to the Authentication Server and pre-filling the email box on the sign-in form? Does anyone solve similar problem I am facing now? Thanks.
Used Pods to download Calendar API and GTMOAuth2 sources.
pod 'GoogleAPIClient/Calendar', '~> 1.0.2'
pod 'GTMOAuth2', '~> 1.1.0'
I followed below sample codes for authoring access google account.
// Creates the auth controller for authorizing access to Google Calendar API.
- (GTMOAuth2ViewControllerTouch *)createAuthController {
GTMOAuth2ViewControllerTouch *authController;
// If modifying these scopes, delete your previously saved credentials by
// resetting the iOS simulator or uninstall the app.
NSArray *scopes = [NSArray arrayWithObjects:kGTLAuthScopeCalendar, nil];
// NSArray *scopes = [NSArray arrayWithObjects:kGTLAuthScopeCalendarReadonly, nil];
authController = [[GTMOAuth2ViewControllerTouch alloc] initWithScope:[scopes componentsJoinedByString:@" "] clientID:kClientID clientSecret:nil keychainItemName:kKeychainItemName delegate:self finishedSelector:@selector(viewController:finishedWithAuth:error:)];
return authController;
}