ThreeParts Now Uses Facebook Connect For Comments

UPDATE: I’m now using Disqus to manage my comments, which allows for Facebook Comments.
Deleting <?php comments_template(); ?> will cause all previous comments not to be displayed.  Don’t worry – you haven’t lost them, but they just won’t show up on previous posts.

If you’ve read any tech news this morning, you’ve probably heard the buzz about Facebook’s new commenting widget for websites.  After reading this great post about installing it on a self-hosted Wordpress blog, I was able to quickly get it up and running.  However, the post does misinform soon-to-be widget installers on a few things.

First of all, in step three, it says:

Open index.php with notepad or Dreamweaver from your Wordpress theme and add: xmlns:fb=http://www.facebook.com/2008/fbml for php you can add:
<?php
xmlns:fb=”http://www.facebook.com/2008/fbml”;
?>

This is misleading.  In most wordpress themes, this line of code should be placed in header.php, near the top.  Also, Wordpress doesn’t typically pull in this line of code with PHP.  Rather, you should add it to the existing HTML  tag, so your final line of HTML should look something like this:

<html xmlns=”http://www.w3.org/1999/xhtml” xmlns:fb=”http://www.facebook.com/2008/fbml”>

Secondly, it does not describe where to place the new Facebook comment script in single.php.  The answer is simple:  find <?php comments_template(); ?>, delete it (see update at top of post), and replace it with:

<script src=
“http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php”
type=”text/javascript”></script>

<fb:comments></fb:comments>

<script type=”text/javascript”>
FB.init(”YOUR_API_KEY_HERE”, “<path from web root>/xd_receiver.htm”);
</scrip
t>

Don’t forget to use your API key in place of ”YOUR_API_KEY_HERE”.  I hope this may clarify some confusion for any of you who were having problems getting it up and running.

Viewing 36 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus