facebookfacebook-graph-apifacebook-fqlfacebook-friends

get some data of user's friends - Facebook / FQL


I'm creating an app where user will be able to select some of his friends then the app will do some job on the selected friends.

My question is =->
Can I directly write this FQL?

SELECT uid, name, pic_square FROM user WHERE uid = $friendUID 

Or Do I need to write something like this?

SELECT uid, name, pic_square FROM user 
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) and UID = $friendUID 

Solution

  • http://developers.facebook.com/docs/reference/rest/fql.query/

    it showed that both are correct