I’m developing a Facebook Chat client and I’m using QXmpp to connect to the chat server.
QString user = ... // This is the Facebook's user id, not the user's email
QString passwd = ...
QXmppClient *xmppClient = new QXmppClient();
xmppClient->connectToServer(user + "@chat.facebook.com", passwd);
Only a few “random” users can’t connect. Checking the log I’m just getting:
vie 12. oct 21:02:58 2012 RECEIVED <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
vie 12. oct 21:03:03 2012 WARNING Authentication failure
The problem was the username capitalization. Facebook allows usernames with capital letters but in order to connect to Facebook Chat using XMPP the username must be normalized to lower case. For instance: