quickblox error when login, android

孤街醉人 提交于 2019-12-07 14:47:48

问题


I'm using quickblox for a chat on android platform, with facebook auth, I do these steps such

1)QBSettings.getInstance().fastConfigInit(..,..,..)
2)QBAuth.createSession(this, QBQueries.QB_QUERY_AUTHORIZE_APP)
3)SmackAndroid.init(this)

4)facebook login and get a accesstoken

5)QBUsers.signInUsingSocialProvider(QBProvider.FACEBOOK, accessToken, null, this)
6)QBChatService.getInstance().loginWithUser

but i have a error: (error when login: SASL authentication failed) I don't know why. can you help me? thanks a lot


回答1:


This is an issue with Chat login

6)QBChatService.getInstance().loginWithUser

If you do facebook login - you should use qb token as a password for Chat http://quickblox.com/developers/Chat#Password

For example:

// init test user
qbUser = new QBUser();
qbUser.setId(ApplicationConfig.testUserID1);
try {
    qbUser.setPassword(BaseService.getBaseService().getToken());
} catch (BaseServiceException e) {
    e.printStackTrace();
}



回答2:


I had a hard time figuring out the issue. In my case I was using ChatService class instead of QBChatService for FB/Twitter login.



来源:https://stackoverflow.com/questions/24547380/quickblox-error-when-login-android

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