Reputation: 6164
I am implementing iPhone app where I want to fetch list of friends from Facebook who has already installed the app into their devices.
For that I'm sending request as below:
AppDelegate *appDelegate=[[UIApplication sharedApplication] delegate];
NSMutableDictionary*params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"picture,id,name,link,gender,last_name,first_name",@"fields", nil];
[[appDelegate facebook] requestWithMethodName:@"friends.getAppUsers" andParams:params andHttpMethod:@"GET" andDelegate:self];
but in response it is giving me only Facebook id of users who has installed app into their device as:
xxxxxxxxxxxxxx1,
xxxxxxxxxxxxxx2,
xxxxxxxxxxxxxx3
How can I receive response as below for all friends who are using app?
{
"first_name" = abc;
gender = male;
id = 10000xxxxxxxxxxxx;
"last_name" = xyz;
link = "http://www.facebook.com/profile.php?id=10000xxxxxxxxxxxx";
name = "abc xyz";
picture = "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif";
}
How can I achieve that?
Upvotes: 2
Views: 884
Reputation: 6164
using FQL I could get response with parameter is_app_use
in Query
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"select uid, name,pic_small, is_app_user from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1", @"query",
nil];
[[APPDELEGATE facebook ] requestWithMethodName: @"fql.query"
andParams: params
andHttpMethod: @"POST"
andDelegate: self];
Upvotes: 1