![](/img/trans.png)
[英]How to authenticate a person who has facebook but not the facebook app on iOS device?
[英]iPhone app: find the Facebook friends who has installed app into their device
我正在实施iPhone应用程序,我想从该应用程序中获取已从该应用程序安装到其设备的Facebook朋友列表。
为此,我发送如下请求:
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];
但作为回应,它仅向我提供将应用程序安装到其设备中的用户的Facebook ID,如下所示:
xxxxxxxxxxxxxx1,
xxxxxxxxxxxxxx2,
xxxxxxxxxxxxxx3
我如何收到正在使用该应用程序的所有朋友的以下回复?
{
"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";
}
我该如何实现?
使用FQL我可以在查询中使用参数is_app_use
获得响应
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];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.