我想在用户登录后获取拨号列表。 这是我的代码
QBResponsePage *page = [QBResponsePage responsePageWithLimit:20];
[QBRequest dialogsForPage:page extendedRequest:nil successBlock:^(QBResponse *response, NSArray *dialogObjects, NSSet *dialogsUsersIDs, QBResponsePage *page) {
NSLog(@"response = %@\n\n",response);
NSLog(@"-------\ndialogObjects = %@",dialogObjects);
} errorBlock:^(QBResponse *response) {
NSLog(@"error is %@",response);
}];
它给了我错误422。 控制台日志是
[QBCore] Response headers: {
"Access-Control-Allow-Origin" = "*";
"Cache-Control" = "no-cache";
Connection = "keep-alive";
"Content-Length" = 45;
"Content-Type" = "application/json; charset=utf-8";
Date = "Wed, 28 Oct 2015 14:07:30 GMT";
"QB-Token-ExpirationDate" = "2015-10-28 16:07:30 UTC";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "nginx/1.6.2";
Status = "422 Unprocessable Entity";
"X-Rack-Cache" = miss;
"X-Request-Id" = 560260a8bf98da9b7c3d8ba133c8d7a7;
"X-Runtime" = "0.007757";
"X-UA-Compatible" = "IE=Edge,chrome=1";
为什么它会给我错误,我使用他们在DOCs中给出的代码
答案 0 :(得分:2)
检查错误原因错误块。它以简单的语言给你错误。
errorBlock:^(QBResponse *response) {
NSLog(@"ERROR GROUP %@",response.error.reasons);
}];