我正在开发一个 Facebook 聊天客户端,我正在使用 QXmpp 连接到聊天服务器。
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);
只有少数“随机”用户无法连接。检查我刚刚得到的日志:
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