1

I have an application associated with Facebook. When I say associated, I mean that the users gave me the permissions on the email and I store their uid in my database. What I want to do now, is to show them all their facebook friends that are in my application too. Moreover, if an user is visiting a profile of a friend of a friend's Facebook (second level) I would like to notify this in my application. In order to do this, I need to be able to retrieve all the friends' uid of my users. Does exist a GraphAPI function that gives me all the Friend uid connected to my app?

bkaid
  • 49,467
  • 20
  • 108
  • 126
Giuseppe Di Federico
  • 2,881
  • 4
  • 18
  • 19

1 Answers1

2

UPDATE: You can get it with the REST API Facebook 'Friends.getAppUsers' using Graph API

You can only get the friends of a user who has given you permission to gather their friends. For example if you are logged in and go here, you should see all of your friends.

https://graph.facebook.com/me/friends?your|tokens|here**

If you try to look up the friends of another user though you get an error message

"Can't lookup all friends of 555555. Can only lookup for the logged in user (515151), or friends of the logged in user with the appropriate permission"

See the User object developer docs.

**If you click on the links in here while logged into facebook it will automatically add in your appropriate tokens.

Community
  • 1
  • 1
JiminyCricket
  • 5,922
  • 7
  • 37
  • 57
  • I know it. But what if I have the permissions about all the users in my platform? In such case it's completely legal to show all the friends that are in my app too, I can even rebuilt a graph of the users basing on the friend's list I gather by their permissions. So I repeat my question: In this case (where I have all the permissions) Does exists a GraphAPI function that gives me all the Friend uid connected to my app? – Giuseppe Di Federico Jul 08 '11 at 08:47
  • It looks like you can only get it with the old REST API http://stackoverflow.com/q/2785093/305633 – JiminyCricket Jul 08 '11 at 22:41