Facebook open graph, filtering friends list array

前端 未结 2 684
暗喜
暗喜 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:33

    You can access the lists of a user by access the friendslist connection via graph api

    example: http://developers.facebook.com/tools/explorer/?method=GET&path=me%2Ffriendlists

    /me/friendlists?access_token='.$access_token.'
    
    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题