获取使用图形API我的朋友的朋友 [英] Get the Friends of my friend using the Graph API

查看:170
本文介绍了获取使用图形API我的朋友的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个非常基本的东西用新的图形API。

I am trying to do a very basic thing with the new Graph API.

我已经知道如何让我的朋友们:
HTTPS://graph.facebook.com/me/friends的access_token = 4333ed34d ......

I already know how to get my friends: "https://graph.facebook.com/me/friends?access_token=4333ed34d..."

但是,如果我有一个朋友谁的ID是123456,那么我想获得的他的朋友们:
HTTPS://graph.facebook.com/123456/friends的access_token = 4333ed34d ......

But if I have a friend who's ID is 123456, then I want to get his friends : "https://graph.facebook.com/123456/friends?access_token=4333ed34d..."

但我得到一个异常:

远程服务器返回错误:(500)内部服务器错误

"The remote server returned an error: (500) Internal Server Error."

为什么我不能这样做呢?这是一个非常简单的任务从API问。

Why can't I do that? It's a very trivial task to ask from the API.

推荐答案

如果我试图得到一个随机用户的朋友,我得到HTTP 500,但它包含了这种反应:

If I try to get friends of a random user I get HTTP 500 but it contains this response:

{
   "error": {
      "type": "Exception",
      "message": "(#604) Can't lookup all friends of <UID>. Can only lookup for the logged in user (<MY_UID>), or friends of the logged in user with the appropriate permission"
   }
}

它是pretty言自明的。

which is pretty self-explanatory.

如果我试图让我的朋友的朋友谁允许查看他的其他朋友,它工作正常。如果我的朋友选择了不允许观看他的其他朋友,我得到了同样的错误。

If I try to get friends of my friend who allows viewing his other friends it works fine. If my friend chose to not allow viewing his other friends I get the same error.

这篇关于获取使用图形API我的朋友的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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