从QuickBlox中的自定义表中检索数据

时间:2013-01-04 13:40:36

标签: iphone ios quickblox

我在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一起发送?

0 个答案:

没有答案