0

我有一个自定义表QuickBlox,我想检索该表的数据

NSURL *topPlaceURL = [NSURL URLWithString:@"https://api.quickblox.com/data/TopChatPoints.json"];
NSURLRequest * jsonRequest = [NSURLRequest requestWithURL:topPlaceURL];
[[NSURLConnection alloc]initWithRequest:jsonRequest delegate:self];    

-(void) connection: (NSURLConnection *) connection didReceiveResponse:(NSURLResponse *)response
{
    jsonData = [[NSMutableData alloc]init];

}
-(void) connection: (NSURLConnection *) connection didReceiveData:(NSData *)data
{
    [jsonData appendData:data];
}

 -(void) connectionDidFinishLoading: (NSURLConnection *) connection
{

    jsonArray = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:nil];

    NSLog(@"MY TOP PLACE = %@",jsonArray);

}

但我没有得到数据,因为我没有传递auth key如何生成auth key和发送它NSURLRequest

4

0 回答 0