如何使用他/她在C#中的Facebook ID获取我朋友的Facebook好友列表?

时间:2012-12-04 13:02:12

标签: asp.net .net facebook c#-4.0

是否可以使用他的Facebook ID获取我朋友的朋友列表?我可以在网格中获取自己的朋友列表,但现在我想根据他们的Facebook用户ID获取他们的朋友列表。

1 个答案:

答案 0 :(得分:2)

你不能。 Facebook api仅为登录用户提供好友列表信息。

如果您尝试它,您将收到如下消息:

   {
       "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"
       }
    }

如果你想这样做,你必须自己解析html和那些东西,但在facebook Graph Api之外

如果您在用户授权您的应用时需要相应的扩展权限,则可以访问当前登录用户的朋友的一些数据,但这就是您所能得到的。

http://developers.facebook.com/docs/authentication/permissions见:friends_xxxx权限),但不是他/她的朋友。