快速 blox 聊天无法进行身份验证 [英] Quick blox chat not authenticating

查看:68
本文介绍了快速 blox 聊天无法进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中使用 quickblox 进行一对一聊天.用户已经登录.但是当我尝试登录聊天时,出现以下错误.

I am using quickblox in my app to do 1 to 1 chat. The user is already login. But when I try to login the chat, I get the following error.

2014-03-31 12:42:09.532 MyChat[2175:3803] QBChat/didNotAuthenticate, error: <failure      xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
2014-03-31 12:42:09.533 MyChat[2175:3803] -[QBContactList dealloc] -> 
2014-03-31 12:42:09.533 MyChat[2175:3803] QBChat/didDisconnect, error: (null)

我做错了什么.

QBUUser *currentUser = [QBUUser user];
[QBChat instance].delegate = self;
[[QBChat instance] loginWithUser:currentUser];

推荐答案

这不是一个正确的方法,

It's not a right way,

currentUser 实例为空,您至少应该设置ID密码 才能登录聊天

currentUser instance is empty, you should set ID and password at least to login to Chat

例如

QBUUser *user = [QBUUser user];
user.ID = 979387;
user.password = @"userpass";
[[QBChat instance] loginWithUser:user];

这篇关于快速 blox 聊天无法进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆