Forums

#1 2009-11-06 21:29:00

bitman
Member
Registered: 2009-04-10
Posts: 4

Best Way to Implement Social Filtering?

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

 

#2 2009-11-06 21:57:18

The Reaper
Member
Registered: 2009-07-12
Posts: 321

Re: Best Way to Implement Social Filtering?

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

 

#3 2009-11-06 23:53:39

bitman
Member
Registered: 2009-04-10
Posts: 4

Re: Best Way to Implement Social Filtering?

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

 

#4 2009-11-07 00:44:31

The Reaper
Member
Registered: 2009-07-12
Posts: 321

Re: Best Way to Implement Social Filtering?

no problem.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson