使用Facebook SDK 4.20 iOS从Facebook获取所有朋友列表 [英] Get All friend list from Facebook using Facebook SDK 4.20 iOS

查看:164
本文介绍了使用Facebook SDK 4.20 iOS从Facebook获取所有朋友列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Facebook SDK 4.20 来吸引所有朋友.目前,我正在使用下面的代码来获得相同的结果:

I am using Facebook SDK 4.20 to get all friends. Currently I am using below code to get the same:

if ([FBSDKAccessToken currentAccessToken]) {
        [[[FBSDKGraphRequest alloc] initWithGraphPath:@"me/friends" parameters:@{@"fields": @"name,id,uid,list_type"}] startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
            if (!error) {
                NSLog(@"User Profile is : %@",result);
            }
        }];
    }

使用上述代码,我仅获得当前正在使用我的应用程序的那些朋友的列表.我的朋友列表中共有458个朋友,但是使用上面的代码,我从列表中仅获得2个当前正在使用我的应用程序/通过Facebook向我的应用程序注册的朋友.

Using above code I am getting a list of only those friends who are currently using my app. I have a total of 458 friends in my friends list but using above code I am getting only 2 friends from the list who are currently using/registered with my app using Facebook.

有人可以帮我解决我的问题吗?我还能做些什么来吸引458个朋友?

Can anyone help me where I am going wrong? What else I can do to get all 458 friends?

我知道与此相关的问题已经在Stack Overflow上提出,但是这些问题都与Facebook SDK V4.20无关,也不与吸引所有朋友有关.受人尊敬的问题可能是关于旧的SDK或关于正在使用其应用程序的朋友的列表.

I know the questions related to this is already asked on Stack Overflow but none of those are about Facebook SDK V4.20 or not related to getting all friends. The respected questions are may be about old SDKs or about getting list of the friends who are using their app.

推荐答案

使用Graph Api

我/朋友

返回已经使用您的应用程序的朋友.

returns friends who already use your app.

我/taggable_friends

返回可以在发布的内容中标记的朋友.

returns friends that can be tagged in content published.

我/我的邀请人

此边缘仅适用于游戏(包括Gameroom),并且需要user_friends权限.它回报了游戏的必然朋友

This edge is only available to Games (including Gameroom), and requires the user_friends permission. its return a inevitable friends for game

更多信息此处 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆