Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get "mutual likes" using fql in facebook?

Hi I am trying to get the likes that are shared between two friends and I am using this query:

SELECT source_id, target_id FROM connection
WHERE source_id = me()
AND source_id IN
   (SELECT uid2 FROM friend WHERE uid1 =me())
AND target_type = 'page'

which is supposed to get the pages that a user and his friends like, however I am getting an empty array in the results. What is wrong with the query?

like image 216
khr2003 Avatar asked Dec 04 '25 06:12

khr2003


1 Answers

Long time for this olution but i'm using:

SELECT object_id FROM like WHERE user_id=" + User.getCurrentUser().getFacebookId() + " AND object_id IN (SELECT object_id FROM like WHERE user_id=" + u.getFacebookId() +")";

like image 87
mattvv Avatar answered Dec 06 '25 23:12

mattvv