0

hi i am connecting to facebook using the following code it work fine for my two account one is gmail and another one is yahoo but it is only working on that accounts not log in on the other accounts of the gmail,yahoo,hotmail i check every acccount that i have every time onautherror come why ? what i am doing wrong is my code is wrong can any one tell me plz

       Jid jidUser = new Jid(txtBoxUserName.Text);

        xmppCon.ConnectServer = jidUser.Server;
        xmppCon.Username = jidUser.User;
        xmppCon.Server = "chat.facebook.com";
        xmppCon.Port = 5222;
        xmppCon.Password = txtBoxPassword.Text;
        xmppCon.AutoResolveConnectServer = true;

        xmppCon.Open();
Faizan Malik
  • 95
  • 1
  • 13

1 Answers1

0

Facebook doesn't allow the username/password XMPP authentication anymore. You can only login using the X_FACEBOOK_PLATFORM SASL mechanism.

See: http://developers.facebook.com/blog/post/2011/09/09/platform-updates--operation-developer-love/

So for Facebook use X_FACEBOOK_PLATFORM SASL auth in agsXMPP and it will work fine.

Alex
  • 4,066
  • 2
  • 19
  • 21
  • hey bro thanks for the reply i checked one thing that if some body entered or saved his username in his profile which you can see in account>settings then we can login through XMPP using that username for example i have user name precious and email id is precious123@gmail.com then i can login through xmpp using precious@gmail.com but it is not login through precious123@gmail.com while facebook allow both so how can i solve this problem ? – Faizan Malik Feb 18 '12 at 05:19