I'm trying to set up a call that will list out a certain number of a friends pictures for a logged in facebook user. It works to spit out the users' picture, but I cannot get the call for fb friends pictures. I'm sure you guys can solve this easily. Here is the code:
<?php
if(!isset($_SESSION['logged_in']))
{
?>
<?php
}
else{
if (!class_exists('FacebookApiException')) {
require_once('./src/facebook.php' );
}
$facebook = new Facebook(array(
'appId' => $appId,
'secret' => $appSecret,
));
$fbuser = $facebook->getUser();
echo $fbuser;
echo $_SESSION['user_name'];
echo '<img src="https://graph.facebook.com/'.$fbuser.'/picture">';
echo '<img src="https://graph.facebook.com/'.$fbuser.'/friends/picture">';
echo '<a href="?logout=1">Log Out</a>';
}
?>