Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Profile Image API deprecated

Tags:

twitter

I am using Twitter API version 1 and replacing them to v1.1.
Then I cannot find users/profile_image/:screen_name API on version 1.1.

https://api.twitter.com/1/users/profile_image/shonanshachu

Does anyone know which API can be the best practice for replacing users/profile_image?
What I want is list of profile images or simple url with parameter of Twitter ID or screen name.

like image 210
morodomi Avatar asked Sep 24 '12 07:09

morodomi


People also ask

What is Listed_count?

listed_count : The number of public lists the account has been added to. created_at : The time at which the account was created.

How do I put a picture on my twitter profile?

Go to your profile and tap Edit Profile. Tap on your profile photo. Upload or select the photo you want.

What is the size of a twitter profile picture?

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

What is Profile Banner on 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.


2 Answers

Maybe this will be useful for you. Those calls return all the info you need, including the image link. If you need only one user's image for a given user_id or user_screen, then you can read more from here: https://dev.twitter.com/docs/user-profile-images-and-banners

https://api.twitter.com/1.1/followers/list.json (you can replace followers with friends)

like image 122
user2169303 Avatar answered Oct 19 '22 18:10

user2169303


I haven't found a great solution to this yet. The closest thing I have found is the twitter API 1.1 docs for users/show, but that is an authenticated call (requiring a user context) which is rate-limited (180 requests per 15 minutes). They mention this about getting the profile image url on the page about uploading a new photo:

You can either update your local cache the next time you request the user's information, or, at least 5 seconds after uploading the image, ask for the updated URL using GET users/show.

I imagine once the 1.0 API is shut off in March 2013, this question will get a lot of votes. :)

There are some hints that twitter is adding methods to their API to aid in retrieving images. We'll have to wait and see.

like image 41
stereoscott Avatar answered Oct 19 '22 16:10

stereoscott