得到我朋友朋友的名单 [英] Get a list of my friend's friends
问题描述
这是一个例子我的意思是:
用户A - 使用应用程序
用户B - 用户A的朋友,也使用应用程序
我希望用户A能够查看使用该应用程序的所有用户的B朋友的列表。
有没有办法得到这个?如何做到这一点?
获取某人的朋友列表的方式是使用 friends.get API方法。然而,webdreamer是正确的,因为你不能只是选择你想要的任何Facebook ID,并开始拉出那个人的朋友信息。您查询的人员必须授权您的应用程序...否则任何应用程序开发人员可以在Facebook上找到任何关于Facebook的任何内容,这将是一个隐私噩梦。
很难准确地告诉你你想做什么,因为你的评论说你只是想要一个用户的朋友,你的原始问题说你想要朋友的朋友。第一个是可能的...第二个不是。
首先,你需要做的只是有人添加/授权你的应用程序。之后, friends.get
将可以正常使用该用户的会话密钥,这将提供给您的应用程序,您可以获得他们的朋友列表。
I am building a small facebook app. In my app I am trying to get a list of my friend's friends. When I perfrom this I receive an error from facebook that I cannot select information about people that are not me (I was trying to retrieve my friend's friends )
Here is an example of what I mean:
User A - Uses the application
User B - Friend of user A and also uses the application
I want User A to be able to see a list of all of user's B friend's who are using the application as well.
Is there any way to get arround that? How can I do this?
The way to get a list of friends for someone is by using the friends.get API method. However, webdreamer is correct in that you can't just pick any Facebook ID you want and start pulling out friend information for that person. The person you query about has to have authorized your application... otherwise any app developer could find out anything about anyone on Facebook, which would be a privacy nightmare.
It's tough to tell exactly what you want to do though, as your comments say you just want the friends of a user, and your original question says you want the friends of the friends. The first is possible... the second is not.
For the first, all you need to do is have someone add/authorize your app. After that, friends.get
will work fine with that user's session key, which will be provided to your application, and you can get a list of their friends.
这篇关于得到我朋友朋友的名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!