I had a problem getting a response from the Facebook SDK, so I implemented this method:
- (void)cleanDictionary:(NSMutableDictionary *)dictionary { [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { if (obj == [NSNull null]) { [dictionary setObject:@"" forKey:key]; } else if ([obj isKindOfClass:[NSDictionary class]]) { [self cleanDictionary:obj]; } }];
}
This will go through the dictionary hierarchy and turn all CFNulls into an empty string.
source share