Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renewing auth token makes dialog appear and disappear #28

Closed
jameseanthony opened this issue Aug 31, 2010 · 5 comments
Closed

Renewing auth token makes dialog appear and disappear #28

jameseanthony opened this issue Aug 31, 2010 · 5 comments

Comments

@jameseanthony
Copy link

When a user is logged in but the access token is expired, calling -(void)authorize:permissions:delegate: on the Facebook object causes the FBLoginDialog box to animated on and off the screen instantly. If the renewal can be done without user interaction, it would be a much better experience to let that happen in the background instead of obstructing the application.

@yujuan
Copy link

yujuan commented Aug 31, 2010

If your user usually need very long session. One way is to ask for offline_access permission, the access_token would not expire unless the user explicitly log out.

@jameseanthony
Copy link
Author

Once the user logs in once, it would be nice to not make them log in every time they launch the app. offline_access is way overkill, as it gives permission to access account information when the app isn't active.

@yujuan
Copy link

yujuan commented Aug 31, 2010

For not make them login every time they lauch the app, you can save the access_token in permanent store and use it next time the user launch the app. See theRunAround demo app for example. Actually offline_access means a non expiring token. i.e., even if you do not ask for offline_access, the access_token you have can be used to access user's information as long as it does not expire.

@jameseanthony
Copy link
Author

I do save the access_token as in theRunAround. It is still associated with an expiration date, and so the session isn't valid until I call authenticate, with is what triggers the dialog appearing and disappearing.

@yujuan
Copy link

yujuan commented Aug 31, 2010

When the access token expired, you have to call authorize to get a new access token. Therefore I would suggest use offline_access for now. At the same time, I will see if there is anything else we can do. Hope this helps.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants