1

当我尝试制作这个 fql 时:

print graph.fql('SELECT name FROM user WHERE gender =male ')

我收到了这个错误:

OAuthError: [602] (#602) gender is not a member of the user table.

我已将它们添加到朋友数据权限中。

4

1 回答 1

3

您可以使用 Graph API 获取此信息 flist=graph.get('me/friends?fields=gender')

如果您只需要 FQL,请执行以下操作: graph.fql('SELECT gender FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())')

几天前我实现了这个,你可以在这里查看源代码:https ://github.com/astronomersiva/Facebook-analysisrs/blob/master/Gender%20analysisr.py

于 2014-06-10T08:07:17.400 回答