Ben her zaman print_r
'boş dizi sa ancak kullanıcı fotoğrafları almak için kullanıyorum:
$facebook = new Facebook(array(
'appId' => 'XXX',
'secret' => 'XXX',
'cookie' => true,
));
if ($facebook->getSession()) {
try {
$profile = $facebook->api('/me/photos');
echo "<pre>";
print_r($profile);
} catch (FacebookApiException $e) {
echo $e->getMessage();
exit();
}
}
else {
$login_url = $facebook->getLoginUrl(array(
'next' => 'XXX',
'cancel_url' => 'XXX',
'req_perms' => 'user_about_me,user_location,user_hometown,user_birthday,user_interests,user_likes,user_photos'
));
echo '<a href="'.$login_url.'">Click here to login</a>';
}
Ben kullanıyorsanız:
$profile = $facebook->api('/me');
Bu veri dolu ama fotoğraf bilgi Aradığım değil print_r
'nin bir dizi.
Herhangi bir fikir?