I want to obtain last links from specific user account.
I use this code:
<?php
require_once("sdk.php");
$config = array();
$config['appId'] = '...';
$config['secret'] = '...';
$fb = new Facebook($config);
try {
$links = $fb->api('/USER_ID/links', 'GET');
print_r($links);
} catch(FacebookApiException $e) {
print_r($e);
}
?>
but all I get is:
Array ( [data] => Array ( ) )
despite the fact that user has some links added.
What am I doing wrong?
you can get the user links using below code
or as you use above make some changes
Thanks