Hi,
I'm using this code to parse XML in the instance variable response
:
@implementation Delegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
MKFacebook *fbConnection = [[MKFacebook facebookWithAPIKey:@"----" delegate:self] retain];
[fbConnection login];
NSMutableDictionary *parameters = [[[NSMutableDictionary alloc] init] autorelease];
MKFacebookRequest *request = [MKFacebookRequest requestWithDelegate:self];
//set up parameters for request
[parameters setValue:[NSArray arrayWithObjects:[fbConnection uid], @"123456789", nil] forKey:@"uids"];
[parameters setValue:[NSArray arrayWithObjects:@"first_name",@"last_name",nil] forKey:@"fields"];
//send the request
[request sendRequest:@"users.getInfo" withParameters:parameters];
}
-(void)userLoginSuccessful
{
NSLog(@"neat");
}
- (void)facebookRequest:(MKFacebookRequest *)request responseReceived:(NSString *)response
{
CFStringRef response = (CFStringRef)response;
NSData *xmlData = [[NSData alloc] initWithData:[response2 dataUsingEncoding:NSUTF8StringEncoding]];
NSXMLParser *parser = [[[NSXMLParser alloc] initWithData:xmlData] autorelease];
[parser setDelegate:self];
[parser parse];
}
But, I am getting this console error upon executing the code:
2010-08-12 20:24:46.924 App[2966:a0f] -[NSXMLDocument dataUsingEncoding:]: unrecognized selector sent to instance 0x47c250
Thanks in advance :)