After successfully signing up, i'm getting users Facebook pictures in this way
/*
* Get user profile picture
*/
try {
// Returns a `FacebookFacebookResponse` object
$response = $fb->get(
'/' .$fbUserProfile['id'] . '/picture',
$_SESSION['facebook_access_token']
);
} catch(FacebookExceptionsFacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(FacebookExceptionsFacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$avatar = $response->getHeaders()['Location'];
$this->model_account_customer->addCustomerAvatar($avatar, $this->customer->getId());
So far so good, but the pictures size is 50x50 :( . I read all similiar questions here, but none of them helped me. Also, i've tried to add type=large
, i've changed the $response
array like that
$response = $fb->get(
'/' .$fbUserProfile['id'] . '/picture',
$_SESSION['facebook_access_token'],
array(
'type' => 'large'
)
);
Still not working. Any ideas would be appreciated :)