12

我也想尽可能使用javascript客户端脚本来做到这一点。

4

2 回答 2

22

您总是可以使用 jQuery 进行 AJAX 调用,因为 Disqus 上的几乎所有内容现在都已获得。

首先,您必须使用 (http://disqus.com/api/docs/threads/list/) 获取线程 ID:

http://disqus.com/api/3.0/threads/list.json?api_key=API_PUBLIC_KEY_HERE&forum=[shortforumid]&thread=link:[链接]

最重要的部分是 thread= 有 link:[link] 作为 link: 表示我们正在使用 URL。

获得线程 ID 后,您必须访问 (http://disqus.com/api/docs/posts/list/):

http://disqus.com/api/3.0/posts/list.json?api_key=API_PUBLIC_KEY_HERE&thread=[线程id]

提醒一下,您不需要放在括号中...

于 2011-01-21T04:44:14.400 回答
1

接受的答案包括对 Disqus API 的 2 次不同调用,以避免限制使用,您只能使用 1 次调用来通过 url 获取评论列表:

http://disqus.com/api/3.0/posts/list.json?api_key=API_PUBLIC_KEY_HERE&forum=[shortforumid]&thread=link:[链接]

于 2017-02-09T14:53:28.163 回答