« FriendFeed Login Template Module | Main | Pagination 1.5 - Create Multi-Page Entries »

Import FriendFeed Comments

FriendFeed Comments is a plugin for Movable Type that enables you to import and display comments made using FriendFeed on your entries. You can also use the plugin to enable your blog commenter to "Cc." their comments to FriendFeed (if they have a FriendFeed account).

Background: FriendFeed Comments

FriendFeed is service that enables you aggregate and share your stuff from many other web sites, all in one place. Your feed can pull in your blog RSS feeds, photos from Flickr, videos from YouTube, tweets from Twitter, and many more.

Each item in your feed -- whether it is a blog entry or tweet -- can be commented on by other FriendFeed users.

Some great discussions about blog entries can happen on FriendFeed. The only problem is that those conversations are off-site and separated from the entry published on your blog. One of the goals of the FriendFeed Comments plugin is to bring those comments back to your published blog entry, displaying them with on-site blog comments.

Features

Version 1.0 of the FriendFeed Comments plugins includes the following features:

  • Checks all types of FriendFeed items for comments on your entries. Usually, comments on FriendFeed happen on the RSS item from your entry. Some comments, however, happen on the Twitter message you posted to announce the entry. The plugin aggregates these all these comments by checking all items in the feed.
  • Imports the comments as real MT comments. After importing, comments appear in the admin area just like other comments. Comments are displayed interspersed with on-site comments, displayed in chronological order.
  • New template tags can be used to highlight FriendFeed comments (more info below)
  • High perfomance, does not slow publishing. FriendFeed comments are imported via an MT scheduled task, running every 15 minutes in the background.
  • Check multiple FriendFeed user's feeds for comments. Useful for multi-author blogs and other advanced uses.
  • On-blog commenters can optionally Cc. their comments to FriendFeed. In addition to posting the comment on your blog, the comment will also be posted to item in your FriendFeed. Also, the comment will be posted as an item in the commenter's feed, so they can share the comment (and link) with followers of their feed.

Working Example: ReadWriteWeb

This plugin was suggested by Richard McManus and Marshall Kirkpatrick of ReadWriteWeb, and inspired by the FriendFeed Comments plugin for Wordpress, by Glenn Slaven. I have installed the plugin for ReadWriteWeb and it is now running, importing comments from FriendFeed and enabling commenter to Cc. FriendFeed. Check out the entries at http://www.readwriteweb.com/. Please don't post "test" comments there, you can use the live demo for that...

Live Demo

If you have a FriendFeed account, you can try out the plugin right now:

Click here to access the live demo for FriendFeed Comments.

Requirements

  • MT4+
  • JSON 2.x Perl module (included)
  • Net::FriendFeed Perl module (included)
  • Remote Comments Schema plugin (included)

Get FriendFeed Comments

This plugin is free to members of MT Hacks.

Download Now

Download Now
Downloads: 143

Installation

  1. Download and expand the zip file.
  2. Upload the contents of the 'plugins' folder to the 'plugins' directory of your MT.
  3. Upload the contents of the 'extlib' folder to the 'extlib' directory of your MT.
  4. Upload the contents of the 'mt-static' folder to the 'mt-static' directory of your MT.
  5. Login to MT and go to the blog you want. Go to Tools > Plugins and choose FriendFeed Comments and then Settings. Enter the FriendFeed username(s) of the feed(s) that contain links to your blog entries. Save the settings.
  6. Ensure that scheduled tasks are running, ideally via cron job. Click here for more info. Comments will only be imported if scheduled tasks are running.
  7. (Optional) Modify your templates using the new template tags described below. If you are using the new MT4-style templates, you probably want to edit the "Comment Detail" template module.
  8. (Optional) Modify your comment form to enable on-site commenters to Cc. their comments to FriendFeed. You need to add two fields named friendfeed_user and friendfeed_remote_key. If you want to use the code shown on the demo entry, you can download this template module and include it.

Template Tags

FriendFeed Comments adds the following new template tags:

  • <MTIfFriendFeedComment> - A conditional tag that is true if the comment exists on FriendFeed.
  • <MTIfFriendFeedEntry> - A conditional tag that is true if the entry in context has been found on FriendFeed.
  • <MTFriendFeedEntryLink> - A URL to the item for the entry on FriendFeed.
  • <MTFriendFeedIconURL> - A URL to the small FriendFeed icon.

Example usage, place before the commenter's name:

<MTIfFriendFeedComment><a href="<MTFriendFeedEntryLink>" target="_blank" title="Posted on FriendFeed">
<img src="<MTFriendFeedIconURL>" align="left" alt="Posted on FriendFeed" /></a>  </MTIfFriendFeedComment>

As always, feedback is welcome.

Rate this entry:

  • Currently 4.2/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4.2/5 (11 votes cast). Powered by the Ajax Rating plugin.

Comments (28)

Brilliant!

Thanks Mark - A few days I was wondering if this exact thing could be implemented. I'm not surprised that you tackled it.

Thanks,

Jason

Marshall Kirkpatrick:

Mark, the closer I look at this the more impressed I am - great work and thanks for setting it up for us!

imabug Author Profile Page:

should the plugin work for dynamically published entries and archives or does it require static publishing? I had a FF comment imported successfully but when I tried to add in the code snippet above to place the FF icon before the author's name, I ended up getting

Smarty error: [in evaluated template line 32]: syntax error: unrecognized tag 'mtiffriendfeedcomment' (Smarty_Compiler.class.php, line 580)

showing up in the entry (my archives are dynamically published)

imabug Author Profile Page:

i should also add that the same thing happened with the FF template module I MTIncluded into the Comments module.

I've just implemented this into one of my sites and I must say that I really like it. One thing I noticed is that at least with the minimal testing I've done is that it seems to take forever to post using Ajax Comments. The comment gets posted on the blog but it just sits there spinning since it's connecting to FriendFeed I guess.

Now I'm getting this error:

Error during task 'Import FriendFeed Comments': JSON version 2 required--this is only version 0.99 at /home/rmiles/public_html/cgi-bin/mt/extlib/Ne t/FriendFeed.pm line 133

Ignore that last one. I updated JSON through my cpanel and then copied it over to extlib. Working great now! Thanks.

imabug, the template tags listed above will only work for static publishing, but the comment importing should still work. Dynamic support for the template tags may be added in a future version.

rm_blogger, the FriendFeed connection is coded to happen in the background, BUT you must have background tasks enabled in MT. If you do not have background tasks enabled, it will add some processing time when comments are posted. In my tests, comment posting wasn't taking *forever* ;), but thanks for the report.

Pouya Author Profile Page:

mark this plugin is very good, but can you improve that? users can like post from blog or other furthers?

Pouya Author Profile Page:

mark i reported a bug in this plugin last week, see this: http://uploads.screenshot-program.com/my.php?image=upl4326638724.jpg

this is a problem with utf-8 characters!

Not sure how long this has been showing up in my activity log but it is new to me.

Error during task 'Import FriendFeed Comments': Can't use an undefined value as an ARRAY reference at /home/blah-blah-blah/cgi-bin/mt/plugins/F riendFeedComments/lib/FriendFeedComments/Util .pm line 32.

I meant to mention in the above comment, I am running MT 4.2

I've just implemented this into one of my sites and I must say that I really like

I've just implemented this into one of my sites and I must say that I really like

I've just implemented this into one of my sites and I must say that I really like

Thanks Mark

I meant to mention in the above comment

I've just implemented this into one of my sites and I must say that I really like

I've just implemented this into one of my sites and I must say that I really like

http://www.t7b.com/dlil

Not sure how long this has been showing up in my activity log but it is new to me

http://www.t7b.com/dlil/show80156.html

I've just implemented this into one of my sites

hi

I've just implemented this into one of my sites and I must say that I really like


نزف

I've just implemented this into one of my sites and I must say that I really like

One thing I noticed is that at least with the minimal testing I've done is that it seems to take forever to post using Ajax Comments.

I had a FF comment imported successfully but when I tried to add in the code snippet above to place the FF icon before the author's name, I ended up getting

One thing I noticed is that at least with the minimal testing I've done is that it seems to take forever to post using Ajax Comments.

I've done is that it seems to take forever to post using Ajax Comments.

Any plans to do a similar plug-in for Google Buzz?

Post a comment