Facebook graph api 只交女性或男性朋友
我正在开发一个facebook应用程序。在这个应用程序中,我使用graph api获得了用户的朋友。例如:Facebook graph api 只交女性或男性朋友,facebook-graph-api,Facebook Graph Api,我正在开发一个facebook应用程序。在这个应用程序中,我使用graph api获得了用户的朋友。例如: $facebook->api("/{$user_id}/friends?fields=id,name,gender"); 这很好,但我想过滤,只得到男性朋友,或只是女性朋友。我通过获取用户的所有朋友,然后选择男性或女性来实现这一点,但我想知道是否有一种方法可以在api调用时过滤这一点。有人能帮我吗?尝试使用FQL: /fql?q=select uid, name, sex from
$facebook->api("/{$user_id}/friends?fields=id,name,gender");
这很好,但我想过滤,只得到男性朋友,或只是女性朋友。我通过获取用户的所有朋友,然后选择男性或女性来实现这一点,但我想知道是否有一种方法可以在api调用时过滤这一点。有人能帮我吗?尝试使用
FQL
:
/fql?q=select uid, name, sex from user where uid in(select uid2 from friend where uid1 = me()) and sex = "female"