-1
안녕하세요, Google 플러스에 성공적으로 로그인했습니다. 이제 이메일, 이미지, 이름 같은 친구들의 정보를 가져 오려고합니다. 그러나 오류가 발생했습니다.Google 플러스 - 친구를 가져 오는 동안 오류가 발생했습니다.
중 하나가 내가 실수 만들고있어 경우, 좀 도와 주 시겠어요 -이 코드를 시도
-
- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
error: (NSError *) error {
self.plusService.authorizer = auth;
NSLog(@"%@",[NSString stringWithFormat:@"Email---> %@\n\n",[GPPSignIn sharedInstance].authentication.userEmail]);
NSLog(@"Received error %@ and auth object ---> %@\n\n",error, auth);
// 1. 만들기 | GTLServicePlus을 | 인스턴스를 사용하여 Google+에 요청을 보냅니다.
GTLServicePlus* plusService = [[GTLServicePlus alloc] init] ;
plusService.retryEnabled = YES;
// 2. 유효한 | GTMOAuth2Authentication을 | 객체를 위임자로 사용합니다. .
[plusService setAuthorizer:[GPPSignIn sharedInstance].authentication];
// 3.을의 Google+ API의 "V1"버전 *
plusService.apiVersion = @"v1";
GTLQueryPlus *query = [GTLQueryPlus queryForPeopleListWithUserId:@"me" collection:kGTLPlusCollectionVisible];
[plusService executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLPlusPeopleFeed *person,
NSError *error) {
if (error)
{
GTMLoggerError(@"Error: %@", error);
}
else {
NSArray *peopleList = person.items;
NSLog(@"--People_List--->%@",peopleList);
}}];
}
하는 것은 오류 가져 오기 - 가져 오기 친구 자세한 내용은
[lvl=3] __41-[ViewController finishedWithAuth:error:]_block_invoke() Error: Error Domain=com.google.GTLJSONRPCErrorDomain Code=401 "The operation couldn’t be completed. (Invalid Credentials)" UserInfo=0x7b0a1d10 {error=Invalid Credentials, GTLStructuredError=GTLErrorObject 0x7b089360: {message:"Invalid Credentials" code:401 data:[1]}, NSLocalizedFailureReason=(Invalid Credentials)}
오류를 얻기 위해이 코드를 사용하여 그것을 자기 Google+의 일부 인증 오류가 있다는 말. – vivek