0

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"

)

4

1 に答える 1