http://docs.disqus.com/help/58/
有人可以展示如何让它工作吗?我不确定我是否了解如何使用在现实生活中显示的代码。
我已经创建了一个数据库并下载了 PHP API,但即使使用上面链接的文档,我也不确定如何使用它。
我假设定期保存和检查帖子,我需要使用 CRON,但如果我能弄清楚如何使用 API,我应该能够自己得到它。
谢谢
Fatal error: Uncaught exception 'Exception' with message 'Missing required argument: forum'
^^ 这是我尝试使其与下面最基本的示例一起使用时遇到的错误:
$DisqusAPI = new DisqusAPI('my_api_key');
// query our MAX datestamp
$since = "SELECT MAX(nDA) FROM news";
$params = array('forum'=>'my_forum_name','since'=>(int)$since,'limit'=>100);
// fetch newer than posts from API
$posts = $DisqusAPI->forums->listPosts(json_decode($params));
// save posts locally
foreach ($posts as $post) {
//save($post);
}