facebook/php-sdk — Issue #500: Problem with loading of galley photos.
Author: siyamudheen
Created: 2011-11-22 06:27:38+00:00
State: open

Hi,

In my application, I need to load gallery images of current user. But unfortunately it is not working properly. Some times, I am getting Photos on the application. please help me...

I am using following codes.

$app_id,
'secret' => $app_secret,
'cookie' => true
));

if(is_null($facebook->getUser()))
{
echo "null";
header("Location:{$facebook->getLoginUrl(array('req_perms' => 'user_status,publish_stream,user_photos'))}");
exit;
}
try {
// Proceed knowing you have a logged in user who's authenticated.
$albums = $facebook->api('/me/albums?access_token='.$session['access_token']);
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}

?>