0

I'm trying to pull a list of my friends in Facebook's OG api v2. If I use the explorer here:

https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends&version=v2.0

I can get my friends, but if I program the app and make a json call:

function getUserFriends(){
    FB.api('/me/friends', function(response) {
      console.log(response);
    });
  }

The friends array response is an empty object.

I'm using the facebook login button:

<fb:login-button scope="public_profile,email,user_about_me,user_birthday,user_education_history,user_hometown,user_location,user_relationships,user_relationship_details,user_photos,user_friends,read_friendlists" onlogin="checkLoginState();">
  </fb:login-button>

and I can access a lot of other data about myself, but not friends. Any idea what I'm missing?

mheavers
  • 29,530
  • 58
  • 194
  • 315
  • 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) – WizKid May 30 '14 at 22:08

1 Answers1

4

Facebook changed a lot of things recently, for privacy reasons you can only get the friends who are also using the App now. See here:

Also see here: Friendslist doesn't work anymore after the powerful access_token

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • [Taggable friends api](https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends) can be used for fetching friends list. However this endpoint needs to get reviewed by Facebook. – hkasera Jul 30 '14 at 07:11