我尝试在我的离子应用程序中使用quickblox聊天,但是出了点问题, 我创建了一个quickblox帐户,然后我创建了一个QBsession:
QB.init(appId,'Authpublic','AuthPrivate');
// create an API session (user is not authenticated)
QB.createSession(function(err, result) {
if (err) {
console.log('Something went wrong: ' + err.message + ' ' + err.detail);
} else {
console.log('Session created with id ' + result.id);
}
});
但是控制台告诉我这个:
setting headers on request to <https://api.quickblox.com/session.json quickblox.min.js:2>
setting headers on request to <https://api.quickblox.com/users.json quickblox.min.js:2>
Failed to load resource: the server responded with a status of 422 (Unprocessable Entity) <https://api.quickblox.com/session.json>
Something went wrong: Unprocessable Entity {"errors":{"base":["Bad timestamp"]}} controllers.js:233
Failed to load resource: the server responded with a status of 401 (Unauthorized)
我也尝试使用这个应用程序:https://github.com/QuickBlox/sample-chat-xmpp-phonegap但是它不起作用所以我试图放入我的quickblox凭证并且不再起作用。我也使用我的id app,Auth public和Auth private credential更改了config.xml文件,但它不起作用。 有人有个主意吗?谢谢!