I currently use the following FQL to search users with name containing "Peter":
SELECT uid, name FROM user WHERE uid IN (SELECT id FROM profile WHERE CONTAINS('Peter'))
How can I know which user is my friend (<-- sounds silly)?
As far as I know, the following FQL can check whether the search result user is friend of me, or not:
SELECT uid2 FROM friend WHERE uid1 = me()
Apart from executing the 2nd query for each of the search result, is there a way to combine both query?
Update: Since FQL is going to be deprecated, Graph API solution is also welcomed.