gpt4 book ai didi

ios - Facebook all_mutual_friends 不工作

转载 作者:行者123 更新时间:2023-11-28 08:18:47 25 4
gpt4 key购买 nike

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

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

该应用已通过审核并获准连接到此 API。

当我根据文档进行图形调用时:

        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;
}

上面的响应是当我们有一个安装了该应用程序的共同 friend 时。

谁知道如何获取共同好友列表?


如果我是此人的 Facebook 好友,我会成功收到进行相同图形调用的共同好友列表。这是响应:

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

这很好,因为有数据,但仅限于 25 个共同好友。有没有办法将限制提高到 25 以上?

最佳答案

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

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.

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

关于ios - Facebook all_mutual_friends 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41843557/

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