Getting Normal sized image & how to enter the information


#1

can anyone help?
i’m trying to get the normal sized avatar image from twitter into my iPhone app…Ive set up the dev twitter etc just stumbling on the correct entry into the URI field: this is what is looks like with the URL of the image i wish to transfer: but is this right _? problem is I’m still getting a very lo-res image transferred…

Request URI: *
https://api.twitter.com/1.1/users/show.json, https://pbs.twimg.com/profi…/555905873151655936/1yBflLwT.png

Or should this info go in the Request query:box ?

Bit confused as to where and how i should place the information,

Grateful for any advice,

Adrian


#2

So you need to call users/show (as you’re doing), and get the profile_image_url_https value. Once you’ve got that, refer to the information on how profile images and banners are handled to get the larger / full-size image. Of course, if the image the user originally uploaded is small, you’ll still get back a lower quality image even if you strip off the “normal” suffix.


#3

Andy,

thannks for your reply,

i think my problem is i don’t know whether I’ve put the data in the correct place,
Here`s a screenshot, i’d welcome your advice,

the link to the pic is : https://pbs.twimg.com/profile_images/555905873151655936/1yBflLwT.png
on the screen grab,

thanks again,

Ade.


#4

Ade, I assumed you were trying to get this data programmatically from inside your iPhone app. It looks like here you’re using the API exercising tool / console to test a particular endpoint.

The value for the URL for the image will be part of the response from the initial request URI + query e.g. https://api.twitter.com/1.1/users/show.json with query of screen_name=yourusername. The URL will be in the profile_image_url_https field. You then need to add or remove the suffix to get the full-size version.


#5

Andy,

Still confused please forgive my ignorance !
So within the app the request for screen name definitely works,
it pulls the name from the twitter site no problem.

So for the twitter site avatar i guess its the same process, however I’m wondering where to place the link i.e…
(https://pbs.twimg.com/profile_images/555…etc
(thats the avatar link)

As you said this should be in the request URI field after
https://api.twitter.com/1.1/users/show.json

should i put a comma or just enter it like this
https://api.twitter.com/1.1/users/show.json https://pbs.twimg.com/profile_images/555905873151655936/1yBflLwT.png

and will this then be passed onto the app request? just like the screen name?
If so i can work out the larger - smaller size issue,

btw, this post was removed due to advertising (was it the name of the particular phone i wonder ? i didn’t even consider that i might be promoting a product !)

thanks

ade


#6

Sorry about the antispam measures - that’s based on the number of links in the post and the relative newness of your account - I will dial that back!

Once you have that pbs.twimg URL (which is part of the response from the original users/show call), there is no need to add it to an API request. You can just load the image resource directly inside your app over HTTP.