Drupal Facebook Comments

One of the nifty widgets that Facebook offers is the ability to use their auth service to leave comments on your website. The integration into your site is relatively simple.

In the past I have sometimes added a custom block and pasted in the code to embed the widget. The problem with this approach is that this will just add comments for a single URL (like your entire site) as opposed to a single page. You can use the php filter to replace the URL in the widget code with the current page… but using the php filter is bad form. So, you are left with the option of creating a module or adding the code to a block in a module. Not too big a deal

Not all cool modules are on Drupal.org!

Recently, while doing a search for a Drupal module to integrate comments (because you never know!), I stumbled on a Beacon 9 blog post which shared their Drupal 7 Facebook Comments module. Its a simple module with some nice admin settings… handy!

One thing to note - this module actually relies on the core comment module. It replaces the comment form with the Facebook Comment form on the selected content types (you can select which ones in the admin UI)… and as an added bonus, it actually records the # of comments per node. Thats not a ton of info, but can be handy in views.

Of course, you could easily modify the module to NOT require the core comment module, or to work along side it, or as an alternate tab, etc… lots of options. But, its pretty cool that they have posted this out for people to use. So - thanks to Beacon 9 for their fine work, and remember - you can find good code even outside of the “official” contrib.