6

I can get the friendlist by

[facebook requestWithGraphPath:@"me/friends" andDelegate:self];

But the list contain all the friends, how could I get the friendlist that only played the app.

Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
Jack Shan
  • 61
  • 1
  • 4

2 Answers2

3

You can query the OpenGraph for the field installed:

[facebook requestWithGraphPath:@"me/friends?fields=installed,name"
                                             andParams:params
                                         andHttpMethod:httpMethod
                                           andDelegate:delegate]; 

That will return you a list of friends, in which some will have the field installed=1

Angel G. Olloqui
  • 8,045
  • 3
  • 33
  • 31
  • Hi Angel, I have the same problem but can't understand in this answer that.. for which application "fields=installed" will check. I mean, we are not giving any appId here then how can we be sure that in the response installed=1 is for my application.Please help me. – iOS Monster Apr 24 '12 at 06:48
  • Well, you are giving the appId when login. The facebook object used is logged within that app. – Angel G. Olloqui May 01 '12 at 16:22
1

This gives you a list of your friends that have the app installed

friend.getAppUsers()

Rahul Chavan
  • 480
  • 3
  • 6