我在我的应用程序中使用 quickblox 进行一对一聊天。 用户已经登录。 但是当我尝试登录聊天时,出现以下错误。
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];
最佳答案
这不是正确的方法,
currentUser实例为空,至少要设置ID和password才能登录Chat
例如
QBUUser *user = [QBUUser user];
user.ID = 979387;
user.password = @"userpass";
[[QBChat instance] loginWithUser:user];
关于ios - Quickblox 聊天未进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22755804/