Quick blox chat not authenticating

与世无争的帅哥 提交于 2019-12-10 19:45:50

问题


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)

What am I doing wrong.

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

回答1:


It's not a right way,

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

For example

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


来源:https://stackoverflow.com/questions/22755804/quick-blox-chat-not-authenticating

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!