Twitter Omniauth Profile Image Broken after a change on Twitter

I have twitter ommiauth as my user model, and I retract when they register a link to their profile picture through hash auth.info.image. Iv noticed that some of them are now breaking when a user updated their profile on Twitter.

I noticed that there is a part of the hash that receives the image via https (profile_image_url_https) in the raw_info section. Details here https://github.com/arunagw/omniauth-twitter . is it best practice to reference so it wonโ€™t happen again?

My problem is that I can have a user who logs in once and leaves a comment, but then their profile changes and it breaks down on the site.

Is there any other way I have to implement this?

Any information would be highly appreciated.

+7
ruby-on-rails twitter omniauth
source share
1 answer

If you save the Twitter URL when the user creates an account or logs in through oAuth and does not check if it changed when trying to display it, this was expected. The only thing I can think of to fix the vanishing links is to check the data using the http or url call and replace its placeholder image or ping API to get the updated image.

0
source share

All Articles