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

Generating long-lived access token #134

Open
chawlaaditya8 opened this issue Nov 29, 2016 · 1 comment
Open

Generating long-lived access token #134

chawlaaditya8 opened this issue Nov 29, 2016 · 1 comment

Comments

@chawlaaditya8
Copy link

The user access token that is currently being generated is a short lived access token which lasts for about 2hrs. How do I generate a long-lived access token?
Thanks in advance :)

@csimpi
Copy link

csimpi commented Mar 13, 2018

Hi, you can do it only with PHP SDK. You may send an AJAX request after successfully JS login with your short-lived token, then with that token, you can claim a long-lived token with PHP.

You don't really need the long-lived token while you are using the JS SDK. Your token will be refreshed by JS SDK automatically. If it is expired you can start a log request again to get a new short-lived token anytime (the user don't need to give permissions all the time)

I'm not that comfortable with the Facebook token handling methods, but this is what we have, we have to cook with these ingredients :)

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