3
votes

Since in FQL, current_location has city How can I query friends by city ?

e.g., select uid,name,pic_small,current_location from user where uid in (select uid2 from friend where uid1 = me()) and current_location.city='Sunnyvale'

(Above FQL doesn't work)

Anyone here knows the correct way to do so ?

Cheers

1
you can't ...you have to loops over your data - Luca Rocchi

1 Answers

2
votes
SELECT current_location, name FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1=me()) and "New York" in current_location

You might have to create a variable to get it filtered by city.