We'd like to offer "social filtering" button that filters comments by the user's Facebook friends.
We currently have a MySql table that stores a user comments along with both their userId (from our site) and fbid (if they have one).
The process would be something like:
1. Retrieve JSON list of the user's Facebook friends (getAppUsers)
2. Somehow find the union between the friends list and database records.
Can anybody start me in the right direction?
We use PHP, MySql and obviously... Facebook Connect.
Thanks for any suggestions
Offline
are you wanting to filter the comments client side or server side?
either way, just do an fql query for the user's friends that are app users.
(eg: "SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='<USERS_ID>') AND is_app_user=1")
then just check to see if the person who posted the comment is in the return array and only show those.
hope this helps.
Offline
Reaper,
Your solution makes sense... will give it a try... also made me to read up on the advantages of FQL vs. API calls.
Thanks for the input.
Offline
no problem.
Offline