Need bigger image when asking for user profile image with GET users/show


#1

I’ve succesfully recover the user image profile, however the size is too small and i need one from at least 100px(square).

Is there a way to do this?

I am using twitteroauth PHP Library(https://github.com/abraham/twitteroauth). This is the code I use to get user name and image:


$connection2 = new TwitterOAuth(
                    CONSUMER_KEY, 
                    CONSUMER_SECRET,
                    $_SESSION['oauth_token'], 
                    $_SESSION['oauth_token_secret']
                );

            $access_token = $connection2->getAccessToken($_REQUEST['oauth_verifier']);
            $_SESSION['access_token'] = $access_token;

            $methods = array(
                'credenciales'  =>  'account/verify_credentials'
            );

            $user = $connection2->get($methods['credenciales']);
            $user = $connection2->get($methods['credenciales']);

            $method['show'] =   'users/show/'.$user->id;

            $show = $connection2->get($method['show']);

            print_r($show);

           $name = $show->screen_name;           
           $image_url = $show->profile_image_url;   // user profile image of 48x48 pixels

Thank you for your time.

P.D. : English is my second language, so sorry if i can’t explain it that well… :confused:


#2

While you won’t always be able to get the pictures as big as you like, see [node:10796] for more info on how to select the various sizes available.


#3

Thank you :slight_smile: