Generating long-lived access token
chawlaaditya8 opened this issue · 1 comments
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 :)
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 :)