vendredi 27 février 2015

Session not Generated in my facebook sdk Api after Login

Hello i am using facebook sdk version 4.0 for post image but after login in facebook for image post its not generated session.



if($session) {
try {
// Upload to a user's profile. The photo will be in the
// first album in the profile. You can also upload to
// a specific album by using /ALBUM_ID as the path
$response = (new FacebookRequest(
$session, 'POST', '/me/photos', array(
'source' => new CURLFile('banner.png', 'png'),
'message' => 'User provided message'
)
))->execute()->getGraphObject();

// If you're not using PHP 5.5 or later, change the file reference to:
// 'source' => '@/path/to/file.name'

echo "Posted with id: " . $response->getProperty('id');

} catch(FacebookRequestException $e) {
echo "Exception occured, code: " . $e->getCode();
echo " with message: " . $e->getMessage();
}
}
else
{
echo '<a href="' . $helper->getLoginUrl() . '">Login with Facebook</a>';
}


Here when i login in facebook i got one blank page and my url generated like bellow



http://ift.tt/1MYlcyU


Please help me for solved this problem . Thanks In Advance.


Aucun commentaire:

Enregistrer un commentaire