Facebook FQL: Getting pages a user likes, which at least one of their friends also likes

Is this possible? I tried one thing which does not work:

SELECT name 
FROM page 
WHERE page_id IN (
    SELECT page_id
    FROM page_fan
    WHERE uid = me()
    AND page_id IN (
        SELECT page_id
        FROM page_fan
        WHERE uid IN (
            SELECT uid2 
            FROM friend 
            WHERE uid1 = me()

Do I need to get the pages a user likes and then loop through them all, checking for friend likes?


This FQL will do the trick:

select name from page where page_id in (SELECT page_id FROM page_fan WHERE uid IN 
(SELECT uid2 FROM friend WHERE uid1 = me ())) and page_id in
(select page_id from page_fan where uid = me())

Hope it will work with you ,,,

Need Your Help

Tap screen to close keyboard in jQuery Mobile

jquery mobile-safari jquery-mobile

We are developing an iPad application with jquery mobile 1.0a4.1.js. We are having some issues with the keyboard. Normal behavior on the ipad is that when a textbox has focus, the keyboard will c...

DirectX9 C++ Recoloring Vertex data in real time

c++ windows directx

I'm very new to DirectX and I'm starting to get a grasp on how the API functions.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.