ThinkUpLLC / ThinkUp

ThinkUp gives you insights into your social networking activity on Twitter, Facebook, Instagram, and beyond.
http://thinkup.com
GNU General Public License v3.0
3.3k stars 676 forks source link

Profile image broken on old posts #1784

Open cdmoyer opened 10 years ago

cdmoyer commented 10 years ago

I didn't dig in to this too much, just noticed this in my recent insights:

http://thinkup.inarow.net/?u=CDMoyer&n=twitter&d=2013-12-18&s=posts_on_this_day_popular_flashback

Image url: http://pbs.twimg.com/profile_images/583236690/cdm_eyebrows_normal.jpg

I assume this is because I changed my profile image recently, and twitter deleted the old one, but it's cached with the tweet. Not sure what the best way to handle this would be.

brokenprofileimage

anildash commented 10 years ago

That seems to be right. The "right" solution would probably be for us to find a way to cache avatars locally, but that seems like a pretty large project. Interestingly, the vast majority of avatars appear to still be online, so I wonder if there's a way we could at least track for patterns of avatars that fail, whether it's by date or for particular URL patterns.

markpasc commented 10 years ago

Not sure if Twitter started deleting them more aggressively but lots of avatar images appear broken for me since a few months ago. They do seem to mostly be old avatars that were replaced, as when I do a new API request for those tweets, the user's profile_image_url has a different filename.

As you'd expect this is more a problem in the Favorite Flashback insight:

jlahflkahj

shahdevansh commented 10 years ago

Instead of caching the images of avatars, we could use the users/show call from twitter's API v1.1 https://api.twitter.com/1.1/users/show.json?screen_name=xyz The request returns profile image in profile_image_url