1
我正在尝试检索用户圈子中的用户。由于GPPSignin已被删除,因此我正在使用GIDSignIn进行登录。但由GIDSignIn提供的身份验证类型为GIDAuthentication,不能用于GTLServicePlus从Google+中获得用户圈子iOS
我已成功使用GIDSignInButton登录。这里是我的代码检索人列表
GTLServicePlus* plusService = [[[GTLServicePlus alloc] init] autorelease];
plusService.retryEnabled = YES;
[plusService setAuthorizer:[GPPSignIn sharedInstance].authentication]; //Problem is here
GTLQueryPlus *query =
[GTLQueryPlus queryForPeopleListWithUserId:@"me"
collection:kGTLPlusCollectionVisible];
[plusService executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLPlusPeopleFeed *peopleFeed,
NSError *error) {
if (error) {
GTMLoggerError(@"Error: %@", error);
} else {
// Get an array of people from GTLPlusPeopleFeed
NSArray* peopleList = [peopleFeed.items retain];
}
}];
您是否解决了此问题? –
@AlexanderVolkov我目前正在手动创建GTMOAuth2Authentication对象并为其分配所有必需的字段,clientID,userEmail,userID,accessToken,refreshToken,expirationDate。它正在工作。 –
因此,您正在使用两种框架 - 旧的Goolge Plus SDK和Google Sign-In,是否正确?你能举个例子吗?您是否尝试过使用Google Plus Web API或? –