iOS:无法获取所有 Google People api 集合列表
<p><p>以下是我使用 <code>GIDSignIn</code> 登录从 google 帐户获取人员/联系人的代码。</p>
<p><strong>代码:</strong></p>
<pre><code>- (void)setAuthorizerForSignIn:(GIDSignIn *)signIns user:(GIDGoogleUser *)user {
GTMOAuth2Authentication *auth = [ init];
;
;
;
;
;
;
appDelegate.authGooglePlus = auth;
NSString *urlStr = @"https://people.googleapis.com/v1/people/me/connections?pageSize=200";
NSURL *url = ;
NSMutableURLRequest *request = ;
;
auth.scope= @"https://www.googleapis.com/auth/contacts";
[auth authorizeRequest:request
completionHandler:^(NSError *error) {
NSString *output = nil;
if (error) {
output = ;
} else {
NSURLResponse *response = nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
if (data) {
output = [ initWithData:dataencoding:NSUTF8StringEncoding];
NSMutableArray *array = [ objectForKey:@"connections"];
}
} else {
// fetch failed
output = ;
}
}
}];
}
</code></pre>
<p>以下是我获取人员/联系人列表的代码,但我只能获取 7 条记录而不是所有记录,知道如何实现吗?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>Google People API 仅返回联系人组中的联系人。问题很可能是其他记录是“其他联系人”,它们不在任何联系人组中,因此不会被返回。</p>
<p>目前无法从 Google People API 获取其他联系人。</p></p>
<p style="font-size: 20px;">关于iOS:无法获取所有 Google People api 集合列表,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/39851239/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/39851239/
</a>
</p>
页:
[1]