/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Using graph api: function getUserFriendList($facebook){ $friends = $facebook->api('/me/friends'); return $friends; } Using legacy api: function getUserFriendList($facebook, $uid){ try { 'method' => 'friends.get', 'uid' => $uid, 'flid' => '', 'callback'=> '' ); $friends = $facebook->api($param); return $friends; } catch(Exception $o) { d($o); } return ''; }
URL: http://thinkdiff.net/facebook/how-to-retrieve-facebook-users-friendlist/