gpt4 book ai didi

ios - Facebook iOS sdk 好友列表返回空

转载 作者:行者123 更新时间:2023-11-29 01:54:24 26 4
gpt4 key购买 nike

我正在使用此代码在 iOS sdk 8.1 中获取 Facebook 好友列表。

FBRequest* friendsRequest = [FBRequest requestForMyFriends];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSArray* friends = [result objectForKey:@"data"];
NSLog(@"Found: %lu friends", (unsigned long)friends.count);
for (NSDictionary<FBGraphUser>* friend in friends) {
NSLog(@"I have a friend named %@ with id %@", friend.name, friend.objectID);
}
}];

但它返回空值。

最佳答案

从 Graph API v2.0 开始,/{user_id}/friends 端点只会返回那些也向您的应用授予相应权限的 friend 。

The /me/friends endpoint no longer includes the full list of a person's friends. Instead, it now returns the list of that person's friends who are also using your app.

关于ios - Facebook iOS sdk 好友列表返回空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31049425/

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