【问题标题】:How get my website Facebook comment in one place?如何在一个地方获取我的网站 Facebook 评论?
【发布时间】:2014-03-02 15:18:42
【问题描述】:

大家好,我正在为我的网站使用 Facebook 评论 API

对于每个 url,Facebook Comment 线程都处于活动状态

喜欢 id=2,id=3

www.mysite.com/page2.php?id=2 这 5 个 cmets 来了

www.mysite.com/page3.php?id=3 这 15 个 cmets 来了

现在我想在页面 www.mysite.com/all_cmets

上显示总共 20 cmets

我将如何做到这一点。

感谢您的帮助。

【问题讨论】:

    标签: php facebook facebook-graph-api


    【解决方案1】:
      This is possible only if you have your post id for which you want to get comments on that particular posts 
    
     //Select total no of comments on this post from facebook
        $fquery = "SELECT comment_info FROM stream WHERE post_id ='".$idd."'";
        $fparam = array( 'method' => 'fql.query', 'query' => $fquery );
        $fql = $facebook->api($fparam);
        $cmcount = $fql['0']['comment_info']['comment_count'];
    
    
        /fetch comments,time,id from facebook on current post
            $fquery2 = "SELECT fromid, time,text , id  FROM comment WHERE post_id='".$idd."' LIMIT $ofset,$cmcount ";
            $fparam2 = array( 'method' => 'fql.query', 'query' => $fquery2 );
            $fql2 = $facebook->api($fparam2);
    

    【讨论】:

    • 我是根据帖子 ID 获得的,但我想获得一个宫殿的所有帖子评论,但感谢您抽出宝贵时间
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-12
    • 2017-02-06
    • 1970-01-01
    • 1970-01-01
    • 2012-02-10
    • 2012-05-05
    • 1970-01-01
    相关资源
    最近更新 更多