Skip to content
 

Facebook Chat in bitlbee

Facebook now supports XMPP. Yay.

Using Facebook Chat in bitlbee is pretty straight forward (I am running 1.2.4, older versions of bitlbee require a bit more tweaking, consult the manual).

For Facebook Chat through XMPP to work you need to set a Facebook username.

In the &bitlbee channel

account add jabber <username>@chat.facebook.com> <Facebook password>
account on

that’s it.

Edit (04-03-2011): As some has pointed out, you need to input your username in lowercase.

Facebook users are listed by their Facebook user id (uXXXXXXX) so you have to rename them manually, unless you are using irssi.

Download this script to ~/.irssi/scripts and load it

/script load bitlbee_rename

(Note: This script only renames your Facebook contacts – The original version which renames all contact but does not handle international characters really well is available here)

Now each of your contacts will be renamed based on their real name in their vCard.

Remember to symlink to script to ~/.irssi/scripts/autorun if you wish to auto-load it.

16 Comments

  1. Craisis says:

    Thanks!
    I’ve been beating my head against the wall for the past two hours trying to get the nicks to be human readable without having to rename them all by hand.

  2. Maxux says:

    This is a small “fix” to only rename facebook contacts.
    I have emesenne and another Jabber address on my bitlbee, and this script try to rename all my buddies >command(“whois $nick”);
    - }
    +
    + if($host eq “chat.facebook.com”) {
    + if ($channel =~ m/($bitlbeeChannel)/ and $nick =~ m/$username/) {
    + $nicksToRename{$nick} = $channel;
    + $server->command(“whois $nick”);
    + }
    + }
    }

    sub whois_data

  3. f0bar says:

    Great guide!
    Thanks for the rename script.

  4. mrfrenzy says:

    The script is a little too efficient, it also renames all your msn and icq contacts.
    Attached is a modified version that only renames facebook contacts and doesn’t whois existing contacts with non-facebook names.

  5. That bitlbee_rename.pl script works really badly if you have contacts with non-ASCII characters so I modified it to use Text::Unidecode to transliterate the names to ASCII.

  6. Oszedo says:

    I’ve upgraded to 1.2.4 and it doesn’t work for me. Everytime I will connect:

    root@> jabber(username@chat.facebook.com) – Couldn’t log in: Authentication failure
    root@> jabber(username@chat.facebook.com) – Logging in: Signing off..

    :-(

  7. Haavard says:

    The script doesn’t load because of errors:

    <param name="bgcolor"
    (Might be a runaway multi-line "" string starting on line 272)
    (Missing operator before bgcolor?)
    String found where operator expected at (eval 520841) line 273, near "bgcolor" value=""

  8. mcnesium says:

    the rename script does not work here. this is the output:

    18:19 Can’t locate Text/Unidecode.pm in @INC (@INC contains: /home/login/.irssi/scripts /usr/share/irssi/scripts /usr/lib/perl/5.10 /etc/perl
    /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
    /home/login/.irssi/scripts/facebook_bitlbee_rename.pl line 9.
    18:19 BEGIN failed–compilation aborted at /home/login/.irssi/scripts/facebook_bitlbee_rename.pl line 9.

    whats wrong?

  9. As said in Oszedo’s comment, I needed to lower-case my facebook username. Maybe you could emphasize that in your post, it’s been very helpful for me otherwise.

  10. Brian says:

    You don’t have to use a rename script, just use account set #/nick_source full_name

    http://wiki.bitlbee.org/HowtoFacebook

Leave a Reply