Development on a Shoestring

Overcomplicating the issue

One of the main issues that some people have been having with the FriendFeed Comments Plugin is that sometimes, seemingly randomly, it will fail to match up a post with the information from FriendFeed.  There are a couple of reasons why this does happen, but the problems all centre around the fact that I have to use the post title to match up the details because there’s no other uniquely identifiable piece of information available.

This is of course a problem when people edit the title, either due to a typo or a editorial change.  Also there seems to be some string encoding issues, especially around the 32,000 different characters that can render to look like an apostrophe.    I’ve spent quite a lot of time trying to strip out the special characters and normalise the titles so I can be sure of getting a match between what’s on the blog & what’s coming back from the FriendFeed API.  I even tried just stripping out non-alphanumeric characters, but then I had a complaint from an amazingly patient person who’s site was using Cyrillic.  So what I’ve got now is a rather hodgepodge solution where it tries to strip out as many characters as possible, then does an md5 hash on that to use as the id, and some people are still having issues where, for no apparent reason, the posts won’t match up.

(more…)

FriendFeed Comments WordPress Plugin

Well, FriendFeed released their API yesterday, along with pre-written php & python libraries.  It’s a really good API, got access to all the data you see on the site.  So I’ve written up a WordPress plugin that will pull back comments from FriendFeed & show them on your site.  This plugin will allow you to display on your own site the comments that people make on FriendFeed about your post. 

I keep trying to think of a more succinct way of writing that but I can’t.  I always sounds more confusing than it is. See the plugin page for more details, this is an early beta I can’t stress that enough.  It will have bugs, it may very well break. 

image

Anyone who is willing to help beta test would be very welcome, you can download the zip file here. Unzip that into your plugins folder & activate it.  You’ll then need to go into the options (or settings if you’re running WP2.5) and click on FriendFeed.  Put your FriendFeed nickname in & save.  You’ll then need to drop the new template tag <?php wp_ffcomments(); ?> on to your single post template somewhere inside ‘the loop’.  I put mine just above the <?php comments_template(); ?> call.

Much thanks to Corvida for being my first guinea pig tester.  It seems to be working on her site, and she gets a lot of comments!