开发者

Can I filter friends with FQL?

I'm interested in rendering only a list of friends of a certain sex. I'm using the query below, but not having any luck:

"SELECT name FROM user WHERE sex= $sex AND uid IN ( SELECT uid2 FROM friend WHERE uid1= $fb_uid )"

From what I understand, it should work because AT LEAST ON开发者_StackOverflowE of the constraints is indexable. Am I missing something?


Here are my thoughts:

  1. Make sure that the user have the right permission, I guess it's read_stream
  2. Make sure the user you are matching is the logged in user (maybe using me() instead)
  3. the sex field accepts only: male and female
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜