facebook - FQL - Getting list of friends of same or opposite sex -
i want list of user's friends, gender wise, in 1 call. friends same gender user or friends of opposite gender. currently, have make 2 calls this. first, fetch user's gender , second list this
select uid, name user uid in ( select uid2 friend uid1 =me() ) , sex='< gender >'
to friends have same gender follow:
to gender:
select sex user uid = me()
to friends:
select uid, sex user uid in (select uid1 friend uid2 = me())
and combination of both:
select uid, sex user uid in ( select uid1 friend uid2 = me() ) , sex in ( select sex user uid = me() )
edit
for opposite gender
select uid, sex user uid in ( select uid1 friend uid2 = me() ) , not(sex in ( select sex user uid = me() ))
this return friends same / opposite gender in one query.
Comments
Post a Comment