Open xavierpellvidal opened 6 years ago
After researching a bit I got that the response headers of GET lookaside.facebook.com/platform/profilepic/… and de url of the graph api comented in the post contains Content-Disposition => attachment And seems not being supported by Picasso,Glide, etc
So is this a Facebook bug or we have to wait a Glide fix/implementation?
Strange, I'm actually not sure. In a browser that just downloads the image in question and some documentation suggests that's the expected behavior: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition.
Are there other urls that are less specifically for downloads available in the API? Maybe they use a different url style for images that are meant to be displayed in clients vs those that are meant to be downloaded?
@sjudd it's opened as a bug in Facebook...
I'm experiencing the same, getting the profile pic as lookaside.facebook.com and it won't get the usual picture URL and it only prompts to download the pic, that's odd
I am facing the same issue, any fix ?
@Subair-tc there is problem with header "content-disposition" from facebook. They changed it to "attachement". I'm changing it in okhttp interceptor to inline and everything is working.
@Mistic92 what ?
@Berser6523 Currently facebook api have another but and it's returning default avatar for every user. So no more problem with Glide and this issue can be closed. But if problem get back you can try to do this if using OkHttp as Glide network client.
https://gist.github.com/Mistic92/32666a79e3f28e40b25f87234e228b00
@Mistic92 Thank you for your solution, it works, but only when you are logged in to facebook I store the image URL in SharedPreferences When I quit the app and use it again, glide won't be able to display the image via the image URL I must repeatedly log out and login to show again Is there any other solution?
Hello, since today, all graph api URL from facebook can't be loaded with Gradle version 4.6.1.
Yesterday all was going well but seems that today something has changed in Facebook Backend.
I have tried it with Picasso and 504 error was thrown.
I can reproduce this error in all of my smarthphones (OnePlus 5T Oreo8.1, Samsung Note 4 6.0.1, Galaxy Tab...)
My Gradle call:
ImageUtils.getCDNUrl(mProfile.getUserPic(), 480, 85)
-> gives an url like:https://graph.facebook.com/1131031506918961/picture?width=480&height=480
I have lots of others types of calls to this graph url and all was failing.
Stack trace / LogCat: