I am trying to fetch friend list. I wrote following code..
$friends = $this->facebook->api('me/friends');
echo count($friends);
Answer was 1. (though it should have been 456). What am I doing wrong? Thanks for help.
The data structure returned by the API is different than you think.
Try echo count($friends['data']);
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With