GTMHTTPFetcher Gmail 联系人照片 Returns 状态 503(有时)
GTMHTTPFetcher Gmail Contact Photo Returns status 503 (sometimes)
我正在使用 gdata 获取应用程序用户的 gmail 联系人照片,正是以下代码。但有时获取工作,有时却没有,并给我以下错误:(我怀疑向 google 服务器提供了太多令牌?虽然我还不太熟悉这个概念。但我确实需要获取所有用户的联系人照片,有没有办法处理它??)
提前谢谢你,
imageFetcher:GTMHTTPFetcher 0x145ea3300 (https://www.google.com/m8/feeds/photos/media/XXXXX%40gmail.com/XXXXX) failedWithError:Error 域=com.google.HTTPStatus 代码=503 "The operation couldn’t be completed. (com.google.HTTPStatus error 503.)"
if ([[[contact photoLink] ETag] length] ) {
// imageData = [NSData dataWithContentsOfURL:photoURL];
// requestForURL:ETag:httpMethod: sets the user agent header of the
// request and, when using ClientLogin, adds the authorization header
// get an NSURLRequest object with an auth token
self.flyingtoken ++;
NSURL *imageURL = [[contact photoLink] URL];
GDataServiceGoogleContact *service = [self contactService];
// requestForURL:ETag:httpMethod: sets the user agent header of the
// request and, when using ClientLogin, adds the authorization header
NSMutableURLRequest *request = [service requestForURL:imageURL
ETag:nil
httpMethod:nil];
[request setValue:@"image/*" forHTTPHeaderField:@"Accept"];
GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request];
[fetcher setAuthorizer:[service authorizer]];
[fetcher beginFetchWithDelegate:self
didFinishSelector:@selector(imageFetcher:finishedWithData:error:)];
}
以下是 SGC 的回答:
google 服务器通常会返回 503 错误,表明您的配额已超出。尝试实施指数回退 developers.google.com/api-client-library/java/...
503 错误通常由 google 服务器返回,表明您的配额已超出。尝试实施指数回退 developers.google.com/api-client-library/java/...
我正在使用 gdata 获取应用程序用户的 gmail 联系人照片,正是以下代码。但有时获取工作,有时却没有,并给我以下错误:(我怀疑向 google 服务器提供了太多令牌?虽然我还不太熟悉这个概念。但我确实需要获取所有用户的联系人照片,有没有办法处理它??)
提前谢谢你,
imageFetcher:GTMHTTPFetcher 0x145ea3300 (https://www.google.com/m8/feeds/photos/media/XXXXX%40gmail.com/XXXXX) failedWithError:Error 域=com.google.HTTPStatus 代码=503 "The operation couldn’t be completed. (com.google.HTTPStatus error 503.)"
if ([[[contact photoLink] ETag] length] ) {
// imageData = [NSData dataWithContentsOfURL:photoURL];
// requestForURL:ETag:httpMethod: sets the user agent header of the
// request and, when using ClientLogin, adds the authorization header
// get an NSURLRequest object with an auth token
self.flyingtoken ++;
NSURL *imageURL = [[contact photoLink] URL];
GDataServiceGoogleContact *service = [self contactService];
// requestForURL:ETag:httpMethod: sets the user agent header of the
// request and, when using ClientLogin, adds the authorization header
NSMutableURLRequest *request = [service requestForURL:imageURL
ETag:nil
httpMethod:nil];
[request setValue:@"image/*" forHTTPHeaderField:@"Accept"];
GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:request];
[fetcher setAuthorizer:[service authorizer]];
[fetcher beginFetchWithDelegate:self
didFinishSelector:@selector(imageFetcher:finishedWithData:error:)];
}
以下是 SGC 的回答: google 服务器通常会返回 503 错误,表明您的配额已超出。尝试实施指数回退 developers.google.com/api-client-library/java/...
503 错误通常由 google 服务器返回,表明您的配额已超出。尝试实施指数回退 developers.google.com/api-client-library/java/...