从用户选定的 10 个好友中选择 uid、性别和头像
我想从 10 个选定的好友中选择 uid、sex、pic square一个用户的。
这 10 个朋友是由用户选择的,我可以将他们的 uid 存储在 PHP 数组中,说
$xyz[]
那么我如何使用该数组来获取这 10 个朋友的 uid、性别和图片方块 FQL?
如果使用 FQL 无法做到这一点,我如何使用其他方法来做到这一点?
我尝试过
$FQLQuery = 'SELECT uid,sex,pic_square FROM friend WHERE uid in (" . implode(",", $xyz) . ");';
但这不起作用。我该如何修复它?
Possible Duplicate:
How can I get pic_squre and sex from user id's I already have
I want to select uid, sex, pic square from the 10 selected friends of a user.
And those 10 friends are selected by the user, and I can store their uid in a PHP array, say
$xyz[]
So how can I use that array to get the uid, sex, and pic square of those 10 friends by FQL?
And if this is not possible with FQL, how I can do it with other methods?
I tried this
$FQLQuery = 'SELECT uid,sex,pic_square FROM friend WHERE uid in (" . implode(",", $xyz) . ");';
But this is not working. How can I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需将“朋友”替换为“用户”
Just replace "friend" with "user"
请参阅https://developers.facebook.com/docs/reference/rest/fql.query/。您可以在此处执行 FQL 查询。
因此
friend 表
只有两列:uid1、uid2,如https://developers.facebook.com/docs/reference/fql/friend/
中所述最后您的查询应该是:
See
https://developers.facebook.com/docs/reference/rest/fql.query/
. You can execute FQL queries here.So
friend table
has only two columns: uid1, uid2 as stated inhttps://developers.facebook.com/docs/reference/fql/friend/
Finally your query should be: