开发者

Can I filter friends with FQL?

开发者 https://www.devze.com 2023-02-06 17:34 出处:网络
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:

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

精彩评论

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