在注释表FQL中获取注释的用户名

时间:2012-03-20 05:06:36

标签: facebook-fql

我使用FQL获取特定帖子的Facebook评论数据。 FQL仅返回fromid,但我也需要fromname。我正在使用批量请求同时获得50个帖子的评论。

我的查询是

SELECT object_id,post_id,fromid,time,text,id,reply_xid,post_fbid,is_private FROM comment WHERE post_id='".$postID."'

我该怎么做?

1 个答案:

答案 0 :(得分:0)

您需要进行额外的查询,如下所示:

    $multiQuery_postInfo = array(
        "posts" => "SELECT post_id, actor_id, message, message_tags, likes, comments, share_count, attachment, action_links, type FROM stream WHERE source_id=$pageID",
        "users" => "SELECT uid, username, first_name, last_name, profile_url, pic FROM user WHERE uid IN (SELECT actor_id FROM %23posts)"
    );