【问题标题】:How do I get most commented posts in disqus?如何在 disqus 中获得最多评论的帖子?
【发布时间】:2012-07-25 09:01:12
【问题描述】:

我正在寻找大多数评论帖子的 disqus api,但它让我无处可去。 有人可以与我分享如何获取线程/帖子排序的评论计数吗?像这样的:

listPosts.json?orderby=comment_count&order=desc

【问题讨论】:

    标签: php drupal disqus


    【解决方案1】:

    我正在处理同样的问题,答案是:

    http://disqus.com/api/docs/threads/listPopular/

    您可以设置这些参数...等等...

    $api_key = 'your_public_key';
    $interval = '90d';
    $forum = 'your_website_shortname';
    $limit = 5;
    
    $url_call = "http://disqus.com/api/3.0/threads/listPopular.json?api_key=" . 
                $api_key . "&forum=" . $forum . "&interval=" . 
                $interval . "&limit=" . $limit;
    
    $get_contents = file_get_contents( $url_call ); 
    
    $call = json_decode($get_contents);
    

    【讨论】:

      【解决方案2】:

      Disqus API 似乎不直接支持这一点。但是threads/list 对每个response 都有一个posts 元素。

      【讨论】:

        猜你喜欢
        • 2017-11-03
        • 1970-01-01
        • 2018-03-20
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-12-12
        • 2013-02-11
        相关资源
        最近更新 更多