【发布时间】:2015-03-19 17:41:11
【问题描述】:
在我的 iOS 应用程序中,我需要检索使用 Google+ SDK 登录的用户的总关注者数量,我使用了此方法,但它返回与我的帐户相关的总人数。我只想计算关注我并且可以看到我在墙上发布的内容的人。 这是我使用的代码:
GTLQueryPlus *query =
[GTLQueryPlus queryForPeopleListWithUserId:@"me"
collection:kGTLPlusCollectionVisible];
// 2. Execute the query.
[[[GPPSignIn sharedInstance] plusService] executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
GTLPlusPeopleFeed *peopleFeed,
NSError *error) {
if (error) {
GTMLoggerError(@"Error: %@", error);
} else {
// Render the status of the Google+ request.
NSNumber *count = peopleFeed.totalItems;
Total=[count intValue];
id<GPPShareBuilder> shareBuilder = [self shareBuilder];
if (![shareBuilder open]) {
}
}
}];
我该怎么办?
【问题讨论】:
标签: ios iphone google-api google-plus