Facebook Auth - photoURL expired (Android)

615 views
Skip to first unread message

jittuu

unread,
Oct 26, 2016, 10:45:20 AM10/26/16
to Firebase Google Group
Hi all,

I was trying to show profile photo in my app after user login (with facebook). It worked before but after a few days, I was getting `

URL signature expired` error when I'm fetching photo URL.


My application flow is


1. auth with facebook whenever user open the app (if already logged in)

2. get the user info such as email, photo url.

3. show profile picture with photo url.


But, now it looks like FirebaseUser.getPhotoUrl() or FirebaseUser.getProviderData().get(0).getPhotoUrl() didn't give me the latest photo url.


How can I get latest photo url whenever user auth?


Thank in advance.

Jacob Wenger

unread,
Oct 26, 2016, 1:23:20 PM10/26/16
to fireba...@googlegroups.com
Data provided from third-party identity providers are only refreshed upon sign in. To show the latest data, you will either need the user to sign in again or you will need to use the third-party provider's access token to fetch the data yourself via their API.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/cdf064de-e993-4f02-bca0-f87445961e06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jittuu

unread,
Oct 27, 2016, 12:21:37 AM10/27/16
to Firebase Google Group
Thanks Jacob.

I managed to make it work by using the following code from facebook SDK.

Profile.getCurrentProfile().getProfilePictureUri(200, 200);

Hopefully, it can help a bit if someone is facing the same issue as me.

Regards,
Soe Moe


On Wednesday, October 26, 2016 at 11:53:20 PM UTC+6:30, Jacob Wenger wrote:
Data provided from third-party identity providers are only refreshed upon sign in. To show the latest data, you will either need the user to sign in again or you will need to use the third-party provider's access token to fetch the data yourself via their API.

Cheers,
Jacob
On Tue, Oct 25, 2016 at 7:35 AM, jittuu <soemoe...@gmail.com> wrote:
Hi all,

I was trying to show profile photo in my app after user login (with facebook). It worked before but after a few days, I was getting `

URL signature expired` error when I'm fetching photo URL.


My application flow is


1. auth with facebook whenever user open the app (if already logged in)

2. get the user info such as email, photo url.

3. show profile picture with photo url.


But, now it looks like FirebaseUser.getPhotoUrl() or FirebaseUser.getProviderData().get(0).getPhotoUrl() didn't give me the latest photo url.


How can I get latest photo url whenever user auth?


Thank in advance.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages