When ever a User login with facebook , i set the profile picture using FirebaseUser.getPhotoUrl().
Everything was working just fine but now the profile picture has suddenly stopped working. Opening it's URL in a browser gives me this message "URL signature expired"
Its the a way i can refresh the url and get the latest version whenever i call FirebaseUser.getPhotoUrl()?
@judeebene thanks for this report, looking into it
I suggest you to store user photos in FirebaseStorage instead of external Facebook servers.
FirebaseUser user = mAuth.getCurrentUser();
if (user != null) {
// User is signed in
// Name, email address, and profile photo Url
Global.nombresusuario = user.getDisplayName();
Global.emailusuario = user.getEmail();
Global.uid = user.getUid();
for(UserInfo profile : user.getProviderData()) {
facebookUserId = profile.getUid();
}
Global.linkfoto = "https://graph.facebook.com/" + facebookUserId + "/picture?height=500";
Hey all, I am still pushing to see if we can do anything about this on the backend but it's not an issue with FirebaseUI so going to close it here. Thanks everyone for reporting this and detailing workarounds.
Most helpful comment
FirebaseUser user = mAuth.getCurrentUser();
if (user != null) {
// User is signed in
// Name, email address, and profile photo Url
Global.nombresusuario = user.getDisplayName();
Global.emailusuario = user.getEmail();
Global.uid = user.getUid();
for(UserInfo profile : user.getProviderData()) {
facebookUserId = profile.getUid();
}
Global.linkfoto = "https://graph.facebook.com/" + facebookUserId + "/picture?height=500";