Search code examples
androidapismack

Facebook chat can't work in Smack API with Android


I am developing chat client for my app. Now I am testing it on Gtalk, Facebook, Yahoo. I am 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 I can connect but can't login. I already saw same question here: http://stackoverflow.com/questions/3750547/facing-problem-using-smack-on-android but answer of that doesn't work for me.


Solution

  • 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