When I first started looking at Disqus, I saw that you could import comments and figured that as long as I could import, I could figure things out and make it work. This did prove to be true, however, there were a few hoops to jump through. If you checkout Disqus and want to import from WordPress or Blogger, then they have an easy to use format for importing your comments. If, however, you’re using your own format, they do provide a generic format (WXR) to import your comments. You can read about and checkout this format here. The format is documented, though not as well as it could be. Both the Content:Encoded and the comment_content are shown using CDATA for the content. Presumably so you don’t have to bother encoding the html of your blog entry and the comment. In the course of running into issues I ended up just encoding my html and not using CDATA at all.
Another issue I ran into while getting my xml ready was the link to the blog entries. I had a few links that had apostrophes in them. While this seemed to work fine in several browsers, it ended up being very problematic after I imported my comments (this was my own fault and not Disqus’). Just make sure your urls are properly encoded (i.e. replace your apostrophes with %27).
The last issue I ran into, I will blame on Disqus. Their import example has the following in the xml:
1: <!-- sso only; see docs -->
3: <!-- unique internal identifier; username, user id, etc. -->
4: <dsq:id>user id</dsq:id>
5: <!-- avatar -->
Now I don’t know if there are some docs (as in “see docs”) that I didn’t see but I assumed (incorrectly) that I should send over my ID for the commenter. That was a bad assumption. This section caused my comments and threads to not be imported at all. Furthermore, the import process doesn’t really give you any information about why your xml does or does not work. I did send a couple tweets back and forth with Disqus, though I don’t think they actually looked at the xml I was trying to import (and presumably they would have seen the DSQ Remote section and told me to drop it right away). Once I dropped that section from all of my item elements, the import worked great (besides the URL encoding issue I mentioned above). Below you can see an example of the xml I ended up importing. There is one Item element in this xml where my full import had one item for each comment.
1: <?xml version="1.0" encoding="UTF-8"?>
2: <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dsq="http://www.disqus.com/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.0/">
5: <title>re: Detroit Restaurant Week: My First Android App</title>
7: <content:encoded><p><My Encoded Html<p></content:encoded>
9: <wp:post_date_gmt>2011-03-20 23:32:00</wp:post_date_gmt>
14: <wp:comment_author_email>[email protected]</wp:comment_author_email>
17: <wp:comment_date_gmt>2011-03-27 18:00:35</wp:comment_date_gmt>
18: <wp:comment_content>Now to port it to WinPhone7!</wp:comment_content>
UPDATE: Dex informed me (below in comments) that if you go to http://import.disqus.com and click on the "All Imports" tab, you can see the status of your import as well as if an error occurred and on which line it occurred. Thanks Dex!