5

I am building an app using Facebook Graph API v.20.

The first thing it needs to do is to export the complete list of friends from the user (ID, name and picture) to a CSV file.

Is this possible?

Anders Lindén
  • 6,839
  • 11
  • 56
  • 109
camilo
  • 111
  • 1
  • 5
  • 1
    possible duplicate of [Facebook Graph Api v2.0 me/friends returns empty, or only friends who also use my app](http://stackoverflow.com/questions/23417356/facebook-graph-api-v2-0-me-friends-returns-empty-or-only-friends-who-also-use-m) – Igy Jun 06 '14 at 20:56

1 Answers1

4

Short answer: No.

The Graph API v2.0 reference documentation implies that your app will only be able to access (through the API, at least) those of the user's friends who have themselves used your app and allowed your app to access their own friends list:

Permissions

  • A user access token with user_friends permission is required to view the current person's friends.

  • This will only return any friends who have used (via Facebook Login) the app making the request.

  • If a friend of the person declines the user_friends permission, that friend will not show up in the friend list for this person.

@user664833 pointed out some clarifications to the policy in the comment below:

Effective April 30th, 2014 for Facebook's API v2.0: (1) Friend list is no longer part of the default permission set and has its own permission: Asking for access to a person's friend list is now a separate permission that your app must request. The new permission is called user_friends. (2) Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app. developers.facebook.com/docs/apps/changelog -- URL accessible by FB users registered as developers – user664833 Jun 10 at 5:50

Actually, the URL seems to be public, since I can view it while not logged in. The changelog also explains why some apps can still view all friends, as @SimonCross pointed out:

For apps that existed before April 30th 2014, making an API call without specifying a version number ('unversioned') is equivalent to making a call to the v1.0 of the API.

For apps created on or after April 30th 2014, making an API call without a specifing a version number is equivalent to making a call to v2.0 of the API.

Apps that were inactive or have a creation date on or after April 30th, 2014 will not be able to make calls to v1.0 of the API. They must use v2.0.

Air
  • 8,274
  • 2
  • 53
  • 88
  • I see an application that can do this, it's called friendlistexporter https://apps.facebook.com/friendlistexporter What workaround do they use to bypass this new rule you implemented? – camilo May 21 '14 at 17:53
  • I did not implement any rule. This is not a Facebook support site. I'm not sure how that app was implemented, but you could try asking its creator via [the contact links on his website](http://www.amagit.com/). – Air May 21 '14 at 18:18
  • Do you know if it is possible to acquire the facebook friend list of a user, with other tools different than the graph API V2.0 ? – camilo May 23 '14 at 10:07
  • @camilo No, I do not know. – Air May 23 '14 at 15:20
  • 2
    friendlistexporter was likely created before April 30th 2014 and this can still call Graph API v1.0 until April 20th 2015 - this is why they are, for now, able to acquire the full friend list of a user. Apps created after April 30th 2014 may only call Graph API v2.0. In API v2.0, the API returns only the subset of a user's friends who have also logged into the app. – Simon Cross May 29 '14 at 05:53
  • 1
    Effective *April 30th, 2014* for Facebook's API v2.0: (1) **Friend list is no longer part of the default permission set and has its own permission**: Asking for access to a person's friend list is now a separate permission that your app must request. The new permission is called user_friends. (2) **Friend list now only returns friends who also use your app**: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app. https://developers.facebook.com/docs/apps/changelog -- URL accessible by FB users registered as developers – user664833 Jun 10 '14 at 05:50
  • I also saw that, any workround to get the whole friends list? – Stony Jun 23 '14 at 03:35
  • @Stony If your app was created before 4/30/2014, you might still be able to get it by calling the 1.0 API, as Simon indicated. Aside from that, I am not aware of any workaround. – Air Jun 23 '14 at 15:19