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

Added parameter to force fresh response #120

Merged
merged 2 commits into from
Jun 2, 2018
Merged

Added parameter to force fresh response #120

merged 2 commits into from
Jun 2, 2018

Conversation

Maritims
Copy link
Contributor

@Maritims Maritims commented Jan 23, 2018

Necessary in case a token has been invalidated and the page hasn't been refreshed since.

Ref issue #106

Necessary in case a token has been invalidated and the page hasn't been refreshed since.
@Maritims
Copy link
Contributor Author

This issue is referenced in https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus

Roundtrips to Facebook's servers
To improve the performance of your application, not every call to check the status of the user will result in request to Facebook's servers. Where possible, the response is cached. The first time in the current browser session that FB.getLoginStatus is called, or the JS SDK is init'd with status: true, the response object will be cached by the SDK. Subsequent calls to FB.getLoginStatus will return data from this cached response.

This can cause problems where the user has logged into (or out of) Facebook since the last full session lookup, or if the user has removed your application in their account settings.

To get around this, you call FB.getLoginStatus with the second parameter set to true to force a roundtrip to Facebook - effectively refreshing the cache of the response object.

@ihadeed ihadeed merged commit 8e2f78f into zyra:master Jun 2, 2018
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

Successfully merging this pull request may close these issues.

2 participants