XMPP Finally Arrives to Facebook

Wednesday, February 10, 2010 by darco
Posted in

facebook-150x150 I was just able to connect to chat.facebook.com using an XMPP client with username and password.

When I logged into all of my accounts this morning, I was greeted with a message from chat.facebook.com: "You were marked as Online because you signed on with Jabber."

UPDATE: Official Announcement: Facebook Chat Now Available Everywhere

UPDATE: Added some commentary on Integrating with Facebook Chat

Preliminary Findings

  • JID of other users are of the form u<bignumber>@chat.facebook.com. This is somewhat strange, because I logged in as <username>@chat.facebook.com.
  • I'm disappointed that they felt the need to create a "chat" subdomain, but whatever.
  • S2S is not enabled. Only C2S seems to be working.
  • Your own resource has routing information appended to it, similar to Google Talk.
  • While you may have a resource, nobody else will appear to.
  • PEP and/or Pubsub does not appear to be implemented.
  • The roster appears to be filled with all of your friends...! Not sure if they implement roster versioning. This could lead to HUGE rosters.
  • Everyone is automatically "subscription='both'", as far as the roster is concerned.
  • Your facebook groups are preserved in the roster.
  • The only disco feature chat.facebook.com advertises is ad-hoc commands, but there are no ad-hoc commands available.
  • No TLS on port 5222. No SSL either. This means the connection to Facebook's XMPP servers will not be encrypted.
  • No one appears to be online. Hmm... It was because I had turned off chat for all groups in facebook. Turning them on via the facebook page now has them show up properly!
  • Only one of my facebook friend groups is showing up. The other groups showed up after enabling them on Facebook and logging back into chat.facebook.com.
  • Presence status messages aren't supported.
  • Presence show can only be set to "away" or empty. This means that in iChat, users either appear available or idle.
  • You can't be logged in from more than one location at a time.
  • You can't be logged into facebook chat via XMPP while not being logged in via facebook chat in your browser. If you are on the facebook website, logging in via XMPP will turn on chat in your browser. Incoming messages will go to both places.

Comments on "Integrating with Facebook Chat"

Because roster items and presence subscriptions are based on your Facebook friends, they cannot be created or deleted using the standard XMPP mechanisms.

How unfortunate. The XMPP model for how roster subscriptions work seems like such a natural fit to the way Facebook friend invites work.

Facebook Chat is terse when sending updates for new friends, because the negotiation happens outside of XMPP. Future versions of Facebook Chat may be more conformant.

I'm guessing this is why the roster doesn't update automatically. Good to know that they intend to support it eventually.

Arbitrary IQ stanzas cannot be passed between clients.

This is bad. It means that Jingle, File Transfer, and a slew of other great XMPP technologies simply won't work. What a shame.

The Jabber ID (JID) you see for yourself will be different from the Jabber ID that your contacts will see, because the translation is done internally.

That would explain the JID weirdness I was seeing.

Non-SASL authentication with the "jabber:iq:auth" namespace as described in XEP-0078 is not currently supported.

This is actually a good thing. I hope they never support it.

The XML parser does not yet fully handle XML namespaces. Please stick to the same style as the examples in XMPP RFCs 3920 and 3921 when using XML namespaces.

I think they are referring to XML namespace prefixes, which Google Talk clients absolutely LOVE to add unnecessarily. This isn't a big deal because you can't use a Google Talk client with Facebook.