Question

i am developing chat client for my app.now i am testing it on gtalk,facebook,yahoo.iam using smack api for that.i am now successfully tested it on gtalk.But in case of facebook i got error


 01-13 10:53:05.938: INFO/XMPPClient(389): [SettingsDialog] Connected to chat.facebook.com
01-13 10:53:07.178: ERROR/XMPPClient(389): [SettingsDialog] Failed to log in as chikka0305@chat.facebook.com
01-13 10:53:07.178: ERROR/XMPPClient(389): SASL authentication failed using mechanism DIGEST-MD5: 

as you can see ican connect but cant login .i already saw same question here:http://stackoverflow.com/questions/3750547/facing-problem-using-smack-on-android.


but answer of that dont work for me.


pls help me to get out of this prob.

Was it helpful?

Solution 2

i got my problem.it si perfectly work with asmack-issue 15.jar.and you have to set: connConfig.setSASLAuthenticationEnabled(true);


and you have to set write username only without @chat.facebook.com

OTHER TIPS

This is explained in this site: http://developers.facebook.com/docs/chat

You can see the following excerpt from this site.

Authenticating with Username/Password

The DIGEST-MD5 SASL mechanism is available to support traditional XMPP or multi-protocol IM clients that are not customized for (or even aware of) Facebook. This mechanism requires prompting the user for his or her password; therefore, it should only be used when necessary. In particular, it MUST NOT be used for any client that:

Proxies the XMPP connection (the connection must be directly from the user's computer to Facebook). Reports messages or any other information about user activity to a third party (including the client developer). Integrates with Facebook, or has a Facebook Application ID.

If your application does any of the above, you must use Facebook Platform authentication instead.

The user's Jabber ID is simply his or her Facebook user name with @chat.facebook.com appended. A user must have a Facebook username to use DIGEST-MD5. After the user gets his or her username, he or she must log out of and into Facebook once for us to store the special hash of the password.

If your application falls in any one of the case, then it may not work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top