Retrieve user's friends who like the same fan page

点点圈 提交于 2020-01-04 02:51:08

问题


I try to find facebook api to retrieve user's friends who like the same fan page but I dont think the new graph api able to do this.

While searching in the stackoverflow, I came out with this FQL:

select user_id from like where object_id = "[page_id]" and user_id in (select uid2 from friend where uid1 = me())

but facebook return me with

array(0) {
}

is there any solution ?


回答1:


You can do this with FQL:

SELECT uid FROM page_fan 
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) 
    AND page_id = "[fan_page_id]"

Which returns you friends who are fans of given fan page ([fan_page_id]). It works at this moment quite well.



来源:https://stackoverflow.com/questions/6530193/retrieve-users-friends-who-like-the-same-fan-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!