Facebook all_mutual_friends不工作 [英] Facebook all_mutual_friends not working

查看:95
本文介绍了Facebook all_mutual_friends不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个连接到Facebook的all_mutual_friends API的iOS应用程序。

I'm building an iOS app that connects to Facebook's all_mutual_friends API

https://developers.facebook.com/docs/graph-api/reference/user-context/all_mutual_friends/

该应用已经过审核并被批准连接到此API。

The app has been reviewed and approved to connect to this API.

当我根据文档进行图表调用: / p>

When I make the graph call per the documentation:

        let params = ["fields":"context.fields(all_mutual_friends.fields(picture.width(500).height(200)))"]
    FBSDKGraphRequest(graphPath: "/\(facebookID)", parameters: params, HTTPMethod: "GET").startWithCompletionHandler { (connection, result, error) in
        print("result: \(result)")
        print("error: \(error)")
    }

我得到以下结果:

result: {
    context =     {
        id = dXNlcl9jb250ZAXh0OgGQ8qbGU5YUiZAKn8g4zuCb1LCMGj3PiCXfe7B72X5DoKkbMpHZA395xRT0iV8D84NQIZBCjJ3VRKC9uNUrMZCiwIeZBOSTRndZCQKi4pgiIgLoxI3xAZD;
    };
    id = 10208913134493418;
}

上面的回复是当我们有一个共同的朋友安装了该应用程序。

The above response is when we have a mutual friend who has the app installed.

有谁知道如何获得共同的朋友名单?

Does anyone know how to get the list of mutual friends?

如果我是与该人的Facebook朋友,我成功收到了一个共同的朋友列表,进行相同的图表调用。这是响应:

If I am Facebook friends with the person, I successfully receive a list of mutual friends making the same graph call. This is the response:

  context =     {
    "all_mutual_friends" =         {
        data =             (
                            {
                "first_name" = Mary;
                picture =                     {
                    data =                         {
                        height = 200;
                        "is_silhouette" = 0;
                        url = "https://...";
                        width = 200;
                    };
                };
            }, //... 24 more results

这是伟大的,因为有数据,但限于25个共同的朋友。有没有办法增加上述限制25?

This is great because there is data, but it is limited to 25 mutual friends. Is there a way to increase the limit above 25?

推荐答案

根据您上面提到的Facebook文档:

According to the Facebook documentation you referred above :


必须从您的服务器调用所有Mutual Friends API以获取完整的li共同的朋友。在JavaScript,Android或iOS客户端代码中调用此API将省略一些结果。

The All Mutual Friends API must be called from your server to obtain the full list of mutual friends. Calling this API in JavaScript, Android, or iOS client code will omit some of the results.

这解释了您所面临的极限。 :)

This explains the limit you are facing. :)

这篇关于Facebook all_mutual_friends不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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