1

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 :)

  • This may be related https://stackoverflow.com/questions/8574759/getting-full-size-profile-picture – ka_lin Oct 03 '18 at 09:28
  • I've already tried it. My goal is to get bigger picture using $fb->get(), not ->api – Rumen Panchev Oct 03 '18 at 15:06
  • The third parameter of that `get` method is `$eTag` according to documentation, so what you are trying to pass here makes no sense. Append the parameter to the path instead. – misorude Oct 04 '18 at 06:59

0 Answers0