如何使用Disqus PHP获取特定页面的Disqus评论数?
require_once('disqusapi/disqusapi.php');
$disqus = new DisqusAPI('sec_key');以上代码片段可用于初始化API对象。如果我在我的网站中有一个页面的URL,应该调用什么方法?
我所有的搜索都指向JavaScript样本,以获取评论数量。
谢谢。
发布于 2014-09-08 09:07:04
只需访问API提供的任何方法:
require_once('disqusapi/disqusapi.php');
$disqus = new DisqusAPI('sec_key');
$page_with_comments = $disqus->posts->details(array('thread'=>THREAD_IDENTIFIER));
$comment_count = $page_with_comments->posts;或者获取最受欢迎帖子的列表:
$popular_pages = $disqus->threads->listPopular(array('forum'=>YOUR_SHORTNAME));发布于 2014-05-15 02:51:08
https://stackoverflow.com/questions/23630150
复制相似问题