views:

175

answers:

1

Hello I am creating an application in which there is a use of facebook API. I am successfully logged in facebook from my iphone simulator. Now I want to get friends list and their current_Location from my application. for that I have written a code

-(IBAction)FriendsPressed:(id)sender { NSString userId = @"XXXXXXXX"; NSString fql = [NSString stringWithFormat:@"SELECT uid from user WHERE uid == %@",userId]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; [[FBRequest requestWithDelegate:self] call:@"facebook.friends.get" params:params];

}

so that I get the friends uid. Now from those uids I want to get their current_location information, for that i write the following query.

-(void)getInfo { ctri++; //NSString *userId = @"1167882069"; _session = [[FBSession alloc]initWithKey:kApiKey secret:kApiSecret getSessionProxy:kGetSessionProxy]; [FBSession setSession:_session]; [_session resume];

NSString* fql = [NSString stringWithFormat:@"SELECT uid, current_location from user WHERE uid == %@",[[friendsarr objectAtIndex:ctri]objectForKey:@"uid"]];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
[[FBRequest requestWithDelegate:self] call:@"facebook.users.getInfo" params:params];

}

But here I got an error message 'Parameter fields is required. with code==100', now which parameter is missing I cant understand. Please help me for this issue.

A: 

Hi, I am also facing the same issue. Any Solution?

Nikhil