我正在研究大多数评论帖的disqus api,但它让我无处可去.有人可以与我分享如何获得线程/帖子有序评论计数?像这样的东西:
listPosts.json?orderby=comment_count&order=desc
Run Code Online (Sandbox Code Playgroud)
小智 9
我正在处理同样的问题,答案是:
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);
Run Code Online (Sandbox Code Playgroud)