facebook growl

This is growl integration to facebook chat. When running you'll get growl notifications for facebook contacts signing on and off, like so


To use it you need to download this tar ball and unzip it


After which, do two things everytime you want to monitor your facebook contacts.

  1. Run this jar, i.e.
    java -jar fbgrowl.jar
    or use the script fbgrowl in the tar ball. This will start a little web server. You'll have to run it in the same directory that you unpack the source, because there's an apple script file that needs to be referenced from the current directory.
  2. Run this bookmarklet
    facebook growl
    This will periodically monitor you list of contacts and send the web server a current list of your contacts. The non-bookmarkleterized source is here

How it works

First, this is a bookmarklet because you need to call the function buddyList.toggleTab(); to expand the buddy list. If you don't you'll never see any of the contacts. I tried doing this in GreaseMonkey as document.location = "javascript:..." but that doesn't work. So, the javascript is really quite simple. It periodically polls the list of buddies and sends this using the sendMessage javascript trick, by encoding this message as the URL of a script tag on the DOM.

The other part of this is just a little web server running on port 3333, that waits for the appropriate request, keeping track of currently signed on users. Every time is receives an update it figures out who signed on, who signed off, and then makes the correct growl messages.