Step of the import image of the user.
1. Make the Application in facebook (get the api key and secret key)
2. then you need to write following code on the page and upload that page any server.
3. you can click the login page and put the login credential (login name password) after that you can see the all photo of the login user..
code is below there :
require 'facebook.php';
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => 'API key here ',
'secret' => 'Secret Key here',
'cookie' => true,
));
$session = $facebook->getSession();
$me = null;
if ($session) {
try {
$uid = $facebook->getUser();
$me = $facebook->api('/me');
$token = $session['access_token'];
} catch (FacebookApiException $e) {
error_log($e);
}
}
if ($me) {
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl(array('req_perms' => 'email,user_birthday,status_update,publish_stream,user_photos,user_videos'));
}
?>
$fql_query = array(
'method' => 'fql.query',
'query' => 'SELECT src FROM photo WHERE aid IN ( SELECT aid FROM album WHERE owner='.$uid.' ) ORDER BY created DESC LIMIT 1,42');
$photo = $facebook->api($fql_query);
/*for($i=0; $i
//echo '
} */
echo '
}
else
{
?>
Login
//echo '
}
?>