得到我朋友朋友的名单 [英] Get a list of my friend's friends

查看:81
本文介绍了得到我朋友朋友的名单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个小的Facebook应用程序。在我的应用程序中,我正在尝试获取我朋友朋友的列表。当我从这个我收到一个错误从Facebook,我不能选择关于不是我的人的信息(我正在寻找我的朋友的朋友)



这是一个例子我的意思是:


用户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屋!

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