2

我正在实现 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";         
 }

我怎样才能做到这一点?

4

1 回答 1

1

使用 FQL 我可以 is_app_use在 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];
于 2012-05-25T05:34:25.863 回答