Facebook open graph, filtering friends list array

前端 未结 2 727
暗喜
暗喜 2021-01-23 15:12

I want my application to filter the friends list I get using the open graph. People who login into my site must see only their friends who also use my app. I\'ve noticed this on

2条回答
  •  忘掉有多难
    2021-01-23 15:48

    Can easily be done when you use FQL to query the user table (in conjunction with the friend table) – that has a field is_app_user, so a query like

    SELECT uid, name FROM user
    WHERE uid IN (SELECT uid1 FROM friend WHERE uid2 = me())
    AND is_app_user
    

    will return only those friends of the current user that are also users of your app.

提交回复
热议问题