在 iPhone 的 google auth2.0 中成功认证后如何进行下一个 api 请求?我得到了带键的返回数据。我需要使用日历 api 和任务 api。
- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
finishedWithAuth:(GTMOAuth2Authentication *)auth
error:(NSError *)error {
NSString *nextURLString = [NSString stringWithFormat:@"https://www.google.com/calendar/feeds/default/allcalendars/mymail@gmail.com"];
//i just gave this url for testing. dont know which url is required here.
NSURL *nextURL = [NSURL URLWithString:nextURLString];
NSURLRequest *request = [NSURLRequest requestWithURL:nextURL];
GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request];
if (error != nil) {
// Authentication failed
} else {
// Authentication succeeded
[fetcher setAuthorizer:auth];
}
}