Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Twitter profile image with username or id with V1.1

Tags:

twitter

Is there a a predictable url to retrieve a user's profile images either by username or id?

...similar to google or facebook:

"https://graph.facebook.com/#{FACEBOOK ID}/picture"
"https://profiles.google.com/s2/photos/profile/#{GOOGLE ID}"

I found this https://dev.twitter.com/docs/user-profile-images-and-banners but it looks like I'll have to do a whole separate request just to get the profile image.

like image 276
jwerre Avatar asked Jul 03 '13 21:07

jwerre


People also ask

Is there a way to see old Twitter profile pictures?

Go to Settings and scroll down to the bottom to check for the option to request your Twitter archive. If you do see it, go ahead and click the button. You'll receive an email with instructions on how to access your archive when it's ready for you to download.

What is profile banner in Twitter?

Profile banners allow users to further customize the expressiveness of their profiles. Use POST account/update_profile_banner to upload a profile banner on behalf of a user. Profile banners come in a variety of display-enhanced sizes.

What is the size of Twitter profile picture?

Check the dimensions. Recommended dimensions for profile images are 400x400 pixels. Recommended dimensions for header images are 1500x500 pixels.


1 Answers

A predictable URL similar to Facebook or Google to retrieve a user's profile images by username is as follows:

"https://twitter.com/[screen_name]/profile_image?size=original"

For example

"https://twitter.com/sqlpowershell/profile_image?size=original"

Other sizes include

  • mini - 24x24 px
  • normal - 48x48
  • bigger - 73x73

Totally relieved not to have to use the API!

like image 53
Chrissy LeMaire Avatar answered Oct 31 '22 13:10

Chrissy LeMaire