How to pull disqus comments

193 views
Skip to first unread message

jde...@gmail.com

unread,
Aug 30, 2013, 9:34:40 AM8/30/13
to disqu...@googlegroups.com
I am very new to Disqus and even more so on a developer level. I am trying to follow the documentation of how to retrieve disqus comments (so that I can store them on my own database for a particular use). 
I don't fully understand how to create the url query. For example: I see 'listposts' listed under the 'thread' and 'catagories' category. In each I am asked for additional info, such as thread id, category id, or, under thread, you can use thread:ident=my-identifier&forum=bobross

Where do I get all of these values? I have a disqus account and made a few test comments (and replied to some as well), but don't know what to do past there.

After I figure all this out, to actually put this into code, do I need any curl calls (for the GET, because I'm trying to pull data, not update) to actually get the data? Or do I just do an ajax call with json reponse?

Mario Mucalo

unread,
Sep 3, 2013, 3:14:55 PM9/3/13
to disqu...@googlegroups.com
Hello jde...

So, what you can do, in most cases is pass a thread with the URL.
For example, if the thread you have is onthe bottom of the page www.example.com, you would do something like:


In a response you would get all the info for a thread in JSON, including the ID, which you can then use for your further calls.

If you cannot start from there, you can start by searching all the threads in your forum:
GET https://disqus.com/api/3.0/forums/listThreads.json?api_key=YOUR_PUBLIC_API_KEY&forum=YOUR_FORUM_NAME
Your forum name is available in the Disqus dashboards.
You will get a list of threads with each one having its ID (and other info), so you can then use that data as future query params.

Depending on putting it to calls, this very much depends on what technology you use, but it generally works.
I have worked with C# HttpWebRequests, as well as with jQuery.ajax and $http AngularJS calls, they all work.

Hope I helped.
Mario
Reply all
Reply to author
Forward
0 new messages