使用fql从friend_list获取好友ids [英] get friend ids from friend_list using fql

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

问题描述

原谅我,如果以前已经回答过,但是看到问题我没有看到我的答案已经在StackOverlow。我是一名经验丰富的PHP程序员,了解Facebook API。我认为FQL实现是非常非常酷的。我对SQL语句的了解将使学习体验非常顺利。但是,Facebook的文档似乎否定了几次。我看到我可以查询的对象列表,但我觉得列表中缺少某些关系对象。例如:我希望得到一个经过身份验证的用户的friend_list和与每个列表相关的用户的朋友列表。我可以成功地检索一个经过身份验证的用户的朋友列表和他们的朋友列表,但是如何获取与他的每个朋友列表对象相关的经过身份验证的用户的朋友列表?

解决方案

好的,进一步的研究使我找到了FQL数据库部分表的完整列表。这可以在这里找到: http://developers.facebook.com/docs/reference/fql/在左边的是一个表的列表,并且看到有朋友和朋友列表的关系表称为friendlist_member。所以在这一点上,我可以得到由身份验证的用户创建的朋友列表,然后执行另一个查询以获取该朋友列表中的用户的ID列表。最后,我做了一个最后的查询,以获取这些用户的名称和照片等细节。


Forgive me if this has been answered before, but looking at the questions asked I did not see my answer already in StackOverlow. I am an experienced PHP programmer getting to know the Facebook API. I think the FQL implementation is pretty freaking cool. My knowledge of SQL statements will make the learning experience very smooth. However, Facebook's documentation seems to negate that a few times. I see a list of objects I can query, but I feel like the list is missing certain relational objects. For example: I wish to get a list of the authenticated user's friend_list and the user's friends that pertain to each of the lists. I can successfully retrieve an authenticated user's friend list and a list of their friends, but how do I get a list of the authenticated user's friends that pertain to each of his friend_lists objects?

解决方案

Ok, so further research has led me to find a complete list of the tables part of the FQL database. this can be found here : http://developers.facebook.com/docs/reference/fql/ on the left hand side is a list of tables and lo and behold, there a relational table for friends and friendlist called friendlist_member. So at this point I can get a list of the friendslists created by the authenticated user and then do another query to get a list of ids of the users in that friendlist. Finally I do a final query to get details like name and photos of those users.

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

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