![](/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.