我QuickBlox
在我的 iOS 应用程序中使用它今天早上运行良好,但现在出现错误Token is required
。我没有改变任何东西。
我认为这是由于以下代码。
NSMutableDictionary *getRequest = [NSMutableDictionary dictionary];
[getRequest setObject:@"total" forKey:@"sort_asc"];
[QBCustomObjects objectsWithClassName:@"TopChatPoints" extendedRequest:getRequest delegate:self];
- (void)completedWithResult:(Result *)result{
// Get objects result
if(result.success && [result isKindOfClass:QBCOCustomObjectPagedResult.class]){
QBCOCustomObjectPagedResult *getObjectsResult = (QBCOCustomObjectPagedResult *)result;
NSLog(@"Objects: %@, count: %d", getObjectsResult.objects, getObjectsResult.count);
}else{
NSLog(@"errors=%@", result.errors);
}
}
休息响应:
<QBASIHTTPRequest: 0xb37fc00>
headers:{
"Access-Control-Allow-Origin" = "*";
"Access-Control-Request-Method" = "*";
"Cache-Control" = "no-cache";
Connection = "keep-alive";
"Content-Length" = 106;
"Content-Type" = "application/xml; charset=utf-8";
Date = "Fri, 11 Jan 2013 14:19:40 GMT";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "nginx/1.0.15";
Status = "401 Unauthorized";
"X-Rack-Cache" = miss;
"X-Request-Id" = 6ddecf8ad894891fdc7c2b14562acc3e;
"X-Runtime" = "0.004958";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
body:<?xml version="1.0" encoding="UTF-8"?>
<errors type="array">
<error>Token is required</error>
</errors>
error:Error Domain=QBASIHTTPRequestErrorDomain Code=3 "Authentication needed" UserInfo=0xae30300 {NSLocalizedDescription=Authentication needed}
2013-01-11 19:50:06.509 Chat.Points[6832:c07] errors=(
"Token is required"
)