开发者

Is it possible to use the Disqus API to get comments from a specific url?

开发者 https://www.devze.com 2023-02-06 11:12 出处:网络
I would also like to do t开发者_运维问答his using javascript client-side scripting only if possible.You could always use jQuery for the AJAX calls as almost everything on Disqus is now get.

I would also like to do t开发者_运维问答his using javascript client-side scripting only if possible.


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

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

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

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

After you get the thread id, you will have to visit (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]

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


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:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消