-1

FB.login(function(response) {

 console.log('Welcome!  Fetching your information.... ');
  FB.api(
    "/me/friendlists",
    function (response) {
      if (response && !response.error) {          
          $.each(response.data, function (key,value) {           
               //console.log(value.id);        
                 FB.api(
                    "/"+value.id+"/members",
                    function (response) {
                      if (response && !response.error) {

                          console.log(JSON.stringify(response));
                        /* handle the result */
                      }
                    }
                );            
          });    
          console.log(JSON.stringify(response));
        /* handle the result */
      }
    }
);

I am Using this code to get friendlist in facebook latest API. That return blank array in return. I got all my FriendList Id. But after call /members that return blank.

I am testing with "Test application and use 'read_custom_friendlists' permission"

andyrandy
  • 72,880
  • 8
  • 113
  • 130
Ajay Patel
  • 11
  • 3

1 Answers1

0

I guess you want to get a list of friends? You can only get friends who authorized your App with the user_friends permission, and this would be the API call: /me/friends.

More information: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130