是否可以使用Disqus API从特定的url获取注释?

时间:2021-12-03 21:11:43

I would also like to do this using javascript client-side scripting only if possible.

如果可能的话,我也希望使用javascript客户端脚本来实现这一点。

2 个解决方案

#1


20  

You could always use jQuery for the AJAX calls as almost everything on Disqus is now get.

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

First you would have to get the thread id from using (http://disqus.com/api/docs/threads/list/):

首先,您必须通过使用(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:[link]

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

The most important part is for the thread= to have link:[link] as the link: says we are using a URL.

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

After you get the thread id, you will have to visit (http://disqus.com/api/docs/posts/list/):

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

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

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

Just as a reminder, you do not need to put in the brackets...

作为提醒,您不需要在括号中……

#2


1  

The accepted answer consists in 2 different calls to Disqus API, to avoid the limit usage you could use only 1 call for obtains a list of comments by an url:

所接受的答案包括对Disqus API的两个不同调用,为了避免限制使用,您只能使用一个调用通过url获取注释列表:

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

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

#1


20  

You could always use jQuery for the AJAX calls as almost everything on Disqus is now get.

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

First you would have to get the thread id from using (http://disqus.com/api/docs/threads/list/):

首先,您必须通过使用(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:[link]

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

The most important part is for the thread= to have link:[link] as the link: says we are using a URL.

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

After you get the thread id, you will have to visit (http://disqus.com/api/docs/posts/list/):

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

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

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

Just as a reminder, you do not need to put in the brackets...

作为提醒,您不需要在括号中……

#2


1  

The accepted answer consists in 2 different calls to Disqus API, to avoid the limit usage you could use only 1 call for obtains a list of comments by an url:

所接受的答案包括对Disqus API的两个不同调用,为了避免限制使用,您只能使用一个调用通过url获取注释列表:

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

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