I’m getting a couple of errors with the code below. The errors are ‘use of undeclared identifier ‘SBJSON’ and ‘unknown receiver ‘jsonParser’, did you mean SBJsonParser’?
I have the JSON library in my project. It’s working with Facebook Graph API and Google Places. For some reason though the code below (also for the Facebook API) isn’t finding the JSON files. Any idea why? I’m wondering if I drag/dropped them into the project incorrectly or something.
thanks for any help.
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
[self hideActivityIndicator];
NSString* responseString = [[[NSString alloc] initWithData:receivedData
encoding:NSUTF8StringEncoding]
autorelease];
NSLog(@"Response from photo upload: %@",responseString);
[self clearConnection];
// Check the photo upload server completes successfully
if ([responseString rangeOfString:@"ERROR:"].location == NSNotFound) {
SBJSON *jsonParser = [[SBJSON new] autorelease];
id result = [jsonParser objectWithString:responseString];
// Look for expected parameter back
if ([result objectForKey:@"image_name"]) {
productImageData = [result copy];
// Now that we have successfully uploaded the photo
// we will make the Graph API call to send our Wishlist
// information.
[self apiGraphAddToWishlist];
} else {
[self showAlertErrorMessage:@"Could not upload the photo." ];
}
} else {
[self showAlertErrorMessage:@"Could not upload the photo." ];
}
}

Please make sure you have this files included in your project and all the .m files are in the “Compile Sources” list on your target.
Also make sure the file you’re referring to is importing SBJSON.h: