问题
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