我提出这个 Facebook 请求:
SLRequest *facebookRequest = [SLRequest requestForServiceType:SLServiceTypeFacebook
requestMethod:SLRequestMethodGET
URL:[NSURL URLWithString:@"https://graph.facebook.com/fql"]
parameters:[NSDictionary dictionaryWithObject:@"SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())" forKey:@"q"]];
[facebookRequest setAccount:_facebookAccount];
[facebookRequest performRequestWithHandler:^(NSData* responseData, NSHTTPURLResponse* urlResponse, NSError* error) {
if(!error){
id json = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:nil];
NSLog(@"%@", [json class]);
//NSCFDictionary. How can i get the data that's inside this?
}else{
NSLog(@"error fb");
}
}];
关于如何检索 NSCFDictionary 中的数据的任何想法?我试过[json valueforKey...]
但没有