Uso de api Graph:
function getUserFriendList($facebook){ $friends = $facebook->api('/me/friends'); return $friends; }
Uso de API legado:
function getUserFriendList($facebook, $uid){ try { $param = array( 'method' => 'friends.get', 'uid' => $uid, 'flid' => '', 'callback'=> '' ); $friends = $facebook->api($param); return $friends; } catch(Exception $o) { d($o); } return ''; }