nov / fb_graph

This gem doesn't support FB Graph API v2.0+. Please use fb_graph2 gem instead.
MIT License
1.04k stars 191 forks source link

refresh token - if user change password #385

Closed ikaiser closed 9 years ago

ikaiser commented 9 years ago

Hy Everyone! When a user changes his password token is regenerated, and my app can not longer use that token, to make calls to Facebook API, how can I automatically regenerate the token ?? thanks.

nov commented 9 years ago

you can't. ask the user to re-login.

ikaiser commented 9 years ago

there is no other solution ??

nov commented 9 years ago

once the access token is revoked/expired, you have no chance to regenerate new one without user interaction.

ikaiser commented 9 years ago

Normally how tough a token ??

nov commented 9 years ago

If you got it via OAuth2 token endpoint, its lifetime should be 60 days. ref.) https://developers.facebook.com/docs/facebook-login/access-tokens#extending

ikaiser commented 9 years ago

and I can make that at 59 days in the user's token automatically regenerate ??

nov commented 9 years ago

sorry, I can't understand your english..

ikaiser commented 9 years ago

59 th day can automatically regenerate the token?

nov commented 9 years ago

Ah, i see. You can't extend token lifetime more than 60 days, so you have to ask users to re-login at least each 60 days.

Using FB iOS/Android SDK, the token lifetime rule might be different though.

ikaiser commented 9 years ago

thanks a lot for everything :)

nov commented 9 years ago

np