Hi!!
What I do to connect, using Smack3.2.0, is this:
SASLAuthentication.registerSASLMechanism(“DIGEST-MD5”,SASLDigestMD5Mechanism.cla ss);
ConnectionConfiguration config = new ConnectionConfiguration(“chat.facebook.com”,5222,“chat.facebook.com”);
connection = new XMPPConnection(config);
connection.login(userName, password);
Where userName only includes username you have in FB, not the number, wihtout @chat.facebook.com.
And what I get is this:
Exception in thread “main” SASL authentication failed using mechanism DIGEST-MD5:
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 325)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:349)
at client.InitSession.loginFacebook(InitSession.java:45)
at client.InitSession.main(InitSession.java:112)
So I decided to download Smack 3.1.0 and use the solution consisting on having your own SASLDigestMD5Mechanism.class, MySASLDigestMD5Mechanism.class, and it works perfectly.
Using this I can perfectly chat with FB.
Another problem I have now is that I can log in Gmail and Jabber, and I can send them messages, but I don’t receive any…
As you can see everything is a problem to me, hehehe.
Thanks for your time!!!