如何在使用应用程序的用户之间获得互动Facebook的喜好 [英] How to get mutual facebook likes between users who are using an app

查看:108
本文介绍了如何在使用应用程序的用户之间获得互动Facebook的喜好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设两个用户正在使用应用程序,并授予应用程序适当的权限来检索他们的喜好。是否可以使用FQL或图形API来找到他们喜欢的共同点?类似于您如何使用图形API在两个用户之间找到交互。我不认为这样的api电话存在,因为我通过文档,但我可能已经错过了。我想知道这是否可行,如果是这样,可以做些什么。我真的很喜欢SQL,只是从FQL开始,可以从一个用户那里获得所有的喜好,但是如何才能获得两个用户之间的普通喜欢(如果可能的话)?

解决方案

可以通过FQL实现。



1)选择用户1的页面

  SELECT page_id FROM page_fan WHERE uid = $ user1 

2)选择用户2的页面,并使用上一个查询中的page_id作为另一个过滤器(又称 - 子查询)



其中给你一个完成这个的最终完整的查询:

  SELECT page_id FROM page_fan WHERE uid = $ user2 AND page_id IN(SELECT page_id FROM page_fan WHERE uid = $ user1)


Let's say two users are using an application and have granted the application appropriate permissions to retrieve their likes. Is it possible using FQL or the graph api to find what likes they have in common? Similar to how you can find mutualfriends between two users using the graph api. I don't think such an api call exists as I went through the docs but I may have missed it. I'd like to know if this is possible and if so, how it can be done. I really stink with SQL and just started with FQL and can get all the likes from a single user, but how do you get only the common likes between two users (if at all possible)?

解决方案

This can be achieved via FQL.

1) Select the pages of user 1

SELECT page_id FROM page_fan WHERE uid = $user1

2) Select the pages of user 2, and use the page_id's from the previous query as another filter (aka - a sub query)

Which gives you a final complete query that accomplishes this:

SELECT page_id FROM page_fan WHERE uid= $user2 AND page_id IN (SELECT page_id FROM page_fan WHERE uid = $user1)

这篇关于如何在使用应用程序的用户之间获得互动Facebook的喜好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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