facebook command line

Facebook Chat In Bitlbee

It’s no surprise that Bitlbee is my chat client of choice. After all, I’ve blogged about it before. So, when I heard rumors that Facebook would be releasing their chat to outside clients over XMPP, I was excited to see the day when I could add it to my running Bitlbee instance. Lo and behold, that day has come.
Adding your Facebook account to Bitlbee is rather painless, as it is with any other account. The only catch, is you have to have a Facebook username set before you can continue. Once that is set, in Bitlbee, from your “&btilbee” status window, you can add the account:
account add jabber @chat.facebook.com 
save
account on
That’s it! You should be up and running with a new XMPP connection to the Facebook chat. However, rather quickly, you’ll notice that the usernames in your “blist” roster are their user identification number on Facebook, rather than their name. Something like “u123456789″. Who is that you wonder? Well, in your “&bitlbee” window, you could run:
info u123456789
Then, using that information, you could rename them one-by-one as they login. However, this is a pain. Fortunately, if you’re running Bitlbee with Irssi, then there is an Irssi Perl script for renaming these automatically for you, as they login. You can find that script here. Save it as “bitlbee_rename.pl” in your “~/.irssi/scripts directory, create a symlink in the autorun directory, load it, and you’re set. Here’s what you would do behind the command line:
wget -O ~/.irssi/scripts/bitlbee_rename.pl http://browsingtheinternet.com/temp/bitlbee_rename.txt
ln -s ~/.irssi/scripts/bitlbee_rename.pl ~/.irssi/scripts/autorun/bitlbee_rename.pl
Now in Irssi, load it:
/RUN bitlbee_rename.pl
Now, each of your Facebook buddies will have their user ID number renamed to “FirstnameLastname” format. The script only works for Facebook chat, so no worries about it mucking up other XMPP connections, and it only renames buddies that haven’t already been renamed. It also saves it to your Bitlbee config (which is /var/lib/bitlbee/username.xml) every time it renames a buddy.
So, there you go. Bitlbee, XMPP and now Facebook, married together. What a beautiful relationship.

Comments

Popular posts from this blog

Black screen after logging in on Windows 2012 R2 using domain credentials on remote desktop connection

Client denied by server configuration error

Water Wonder Resort