Firebaseui-android: Facebook Provider getPhotoUrl() URL is now returning URL signature expired

Created on 27 Feb 2017  路  4Comments  路  Source: firebase/FirebaseUI-Android

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"

https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/14947700_10211346547930488_8169418338838920166_n.jpg?oh=714b8042c1c1a510af58da515660d951&oe=588E990D

Its the a way i can refresh the url and get the latest version whenever i call FirebaseUser.getPhotoUrl()?

auth bug

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";

All 4 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hendrep picture hendrep  路  3Comments

s-p-a-r-k picture s-p-a-r-k  路  5Comments

akrmn picture akrmn  路  4Comments

dmikesell picture dmikesell  路  3Comments

samtstern picture samtstern  路  3Comments