gpt4 book ai didi

iOS Google+ 获取好友数量

转载 作者:行者123 更新时间:2023-11-29 02:12:18 35 4
gpt4 key购买 nike

在我的 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]) {

}



}
}];

我该怎么办?

最佳答案

要获得 Google+ 个人资料的关注者总数,您只需使用 people.get API方法和使用circledByCount .请注意,该数字仅在个人资料已公开时可用,并且它基于所有关注者,不能仅限于使用当前应用程序的个人资料。

关于iOS Google+ 获取好友数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29151472/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com