The friends array is in response.data
. To get the length of the array, just use response.data.length
See How to loop through me/friends and assign each user it's picture from {USERID}/picture from FB.api
/* make the API call */
FB.api(
"/me/friends",
function (response) {
if (response && !response.error) {
console.log('Friend count = ', response.data.length);
}
}
);
[1]: