How To Import Facebook Comments To Your WordPress Database

Written by on February 24, 2012 in WordPress Plugins - 20 Comments

One of the setbacks of using Facebook for comments is that comments are not hosted in your own database. This can be a problem if you ever want to change your commenting system. For a few months I used a combination of Facebook Comments and the default WordPress commenting system though last month I migrated to the Livefyre comment service.

Livefyre syncs all comments from and to your WordPress database though it can’t import Facebook comments. I thought that the previous comments that had been left via Facebook had been lost forever however Brandon Kraft left a comment the other day that showed that the comments could still be seen in the Facebook Open Graph. This gave me hope that the comments could be imported to Livefyre.

Therefore I contacted Jeremy from the Livefyre team (they offer great support). He advised that the functionality to import comments directly from Facebook to Livefyre does not exist however he recommended the WordPress plugin Facebook Comments to WordPress. The plugin copies comments left via the Facebook Comments Social Plugin into your WordPress database.

Once installed, the plugin will work in the background to import your comments to your database. You can change the refresh interval for importing comments and set the locale for comment imports too.

Facebook Comments To WordPress

There are two import modes: Append New and Remove Missing. In the append mode, only new comments are imported. In remove mode comments that have been removed from Facebook are removed from your database too. I noticed that after selecting the ‘Append New’ option, the page refreshes and shows that ‘Remove Missing’ has been selected. I’m not sure if this means that the append option is not working or if the settings page just has a small bug.

The bottom of the settings area informs you of the number of comments that have been imported so far. The import process can take some time. Depending on how many comments you have, it could take 30 minutes or a few hours. It works in the background though so you don’t have to check anything after activating the plugin.

Import Comments Count

I wasn’t sure whether the import process had worked at first. I initially assumed that imported comments would be shown at the top of the comments page. Clearly this wouldn’t be the case as comments are sorted in date order (newest first) by default. I checked the post editor for posts which I knew had comments left via Facebook previously and saw that the comments had been imported. All I need to do is wait for the comments to be synced to Livefyre.

Imported Facebook Comments

I was very impressed with Facebook Comments to WordPress. It imported all of the previous comments left on WP Mods via Facebook and was straight forward to use. You don’t even have to enter any Facebook details such as your app id or app secret. All you need to do is activate the plugin and wait for it to import all of your Facebook comments.

Those of you who used to use Facebook comments should use this to import all of your old Facebook comments to your database. It’s worth installing if you are still using Facebook comments too as it ensures that a copy of your comments is always backed up on your own site. This gives you the freedom to migrate back to the default WordPress commenting system or a third party service such as Livefyre or Disqus at any time in the future.

Good luck,
Kevin

Link: Facebook Comments to WordPress

About

Kevin Muldoon is a Scottish webmaster and blogger who currently lives in Bogota, Colombia. He has an unhealthy obsession with trying out new WordPress themes and plugins and spends too much time in the WordPress Forums.

Post comment as twitter logo facebook logo
Sort: Newest | Oldest
reelseo 12 pts

So glad I found this Kevin.  I thought the facebook comments importer only imported comments that resided on your facebook page.  Are you saying that you were able to import comments created initially on your site, using the Facebook comments SDK?

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo Yes. The comments that were previously left on posts on WP Mods were imported into the comment database using this plugin. :)

My latest conversation: 30 Free WordPress Themes From 2012

reelseo 12 pts

 Kevin Muldoon Thanks.  Very cool.  Im going to try it out.  I've found that the Facebook plugin lags a lot, and isnt really that helpful for social play as I'd thought. So, Im doing exactly what you did but couldnt figure that part out.  Thanks again. 

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo Shortly after I installed the facebook comments plugin the facebook commenting service went down. This highlighted one of the problems of using an external service.Obviously, this can happen here too as I'm using Livefyre at the moment...though all I have to do is deactivate the plugin and the default comment system returns and I can then reactivate it later with all comments synced.

My latest conversation: 30 Free WordPress Themes From 2012

reelseo 12 pts

 Kevin Muldoon exactly.  I initially went over to facebook from disqus because it was taking forever to load.  I need to find someone to rebuild my comments php file for my theme (actually need more help than that ;-) because my comments when those services are down, are pretty messed up ;-)  It is however, much nicer to have them sync'd.  Thank you much.

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo I'm working on an article tonight but if you post your problem with the comments.php file in the forums I'll do my best to help you with it tomorrow.

My latest conversation: 30 Free WordPress Themes From 2012

reelseo 12 pts

 Kevin Muldoon You are so kind (Im just now getting back to my emails and seeing this>...  I actually would love to pay someone to help me with a few wordpress things if that's something you'd be able to do.  Regarding the plugin though, I keep trying the Facebook comments to wordpress plugin but getting errors.  Did you have any issues with it when you installed and activated?

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo No need to pay me. I'm happy to help out WordPress users for free via the forums. 

 

I didn't have any problems with the plugin when I used it. I did have to remove it after installing the sharepress plugin though as it was clashing with that.

My latest conversation: Tae Kwon Do Graduation

reelseo 12 pts

 Kevin Muldoon sorry to ask this again, but I have it up with no errors but it doesnt seem to import anything.  Do I actually need another wordpress plugin for facebook comments or will this pull the comments from a facebook comments implementation that's hard coded into each post with the SDK?  IE - <div data-href="http://example.com" data-num-posts="2" data-width="470"></div>

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo Even if you have removed all facebook integration (like I did), the plugin should still pull comments that were left on your website.

 

Do you know of a post of yours that had facebook comments on it. If so, can you visit https://graph.facebook.com/comments/?ids=http://www.yoursite.com/posturl. If comments are shown there, you will be able to import comments.

My latest conversation: 7 BuddyPress WordPress Themes From 2012

reelseo 12 pts

 Kevin Muldoon weird.  OK, yeah, there are quite a few.  Here's one - https://graph.facebook.com/comments/?ids=http://www.reelseo.com/case-video-email-marketing/   I think the plugin is broken unfortunately.

My latest conversation: 20,000 Free, High Quality Movie Clips Coming To YouTube

Kevin Muldoon 24 pts moderator

 reelseo  Your comments are still there so they can definitely be imported.

 

There's a chance that it is clashing with another plugin. I didn't have that problem but I noticed the plugin was causing problems when I later installed another plugin that used Facebook, so there's a good chance that's what is causing it.

 

You could try this: deactivate all plugins and then activate the facebook import plugin and try and import all of your comments. Then reactivate all of your plugins. You could put your site in maintenance mode temporarily whilst you did this (using a plugin).

My latest conversation: AIDA CAMBIO A CINTA AZUL 009.AVI

Kraft 7 pts

FYI for those using Disqus. The Disqus plugin doesn't automatically resync new comments in the WordPress db to Disqus. If you're using a plugin to bring Facebook comments into your WP db, you'll need to go to the Disqus screen in admin, Advanced Topics, and click export comments. It'll auto-filter duplicates, so no worries there.

Thomas Frank 52 pts

Do you need to be using an actual Facebook Comments plugin, or will this import comments from a hardcoded Facebook Comments box like I have on my site?

My latest conversation: Study Music: Children of Nova - "The Complexity of Light"

Kevin Muldoon 24 pts moderator

 Thomas Frank I just checked your site and you are using the Facebook comments plugin so this plugin should import all comments correctly for you. 

Thomas Frank 52 pts

 Kevin Muldoon Cool! I switched away from LiveFyre a while ago but I've never quite had my mind made up about the decision, so I've been wanting a way to back up the comments.

 

 

Btw, what was your reasoning for switching?

My latest conversation: Study Music: Children of Nova - "The Complexity of Light"

Kevin Muldoon 24 pts moderator

 Thomas Frank Before I was using a combination of Facebook comments and the default WordPress commenting system. I liked Facebook comments though I was aware that many people don't use the service. Though the biggest factor in my decision was the spam I was receiving via Wordpress comments. It was becoming a real pain to moderate the spam messages I was receiving every day. 

antodoms 6 pts

 Thomas Frank I am Facing Problems in Installing this Plugin to my website.... Its even showing Php error in Foreach() Function....  Can anybody help me out... I need to urgently import all my facebook comments to Wordpress ....