不同 id 上的 agsXMPP OnAuthError
您好,我使用以下代码连接到 facebook,它对我的两个帐户运行良好,一个是 gmail,另一个是 yahoo,但它仅适用于该帐户,不能登录 gmail、yahoo、hotmail 的其他帐户,我检查了每个帐户我每次都会出现 onautherror 帐户,为什么?我做错了什么是我的代码错误有人可以告诉我吗?
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();
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();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Facebook 不再允许用户名/密码 XMPP 身份验证。
您只能使用 X_FACEBOOK_PLATFORM SASL 机制登录。
看:
http://developers.facebook .com/blog/post/2011/09/09/platform-updates--operation-developer-love/
因此,对于 Facebook,在 agsXMPP 中使用 X_FACEBOOK_PLATFORM SASL 身份验证会工作得很好。
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.