try {
$friends = $facebook->api('/me/friends');
} catch (FacebookApiException $e) {
error_log($e);
}
Shows :Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in C:\wamp\www\fb\facebook_php_sdk\src\base_facebook.php on line 1106
You must have access token for this operation.
First you request for access token like this:
Then you can request for friend list like this:
This might work. I this works,then accept this answer!
Happy Coding!