<div style="padding: 1em; background-color: #F7FA8C; margin: 2em;">
This example no longer works since the "offline_access" permission has
been deprecated. More information can be found here: <br>
<a href="https://developers.facebook.com/docs/offline-access-deprecation/">
https://developers.facebook.com/docs/offline-access-deprecation/
</a>
</div>
<fb:login-button scope="offline_access">Grant offline_access</fb:login-button>
<h1>Access Token:</h1>
<pre id="access-token"></pre>
<script>
var
pre = document.getElementById('access-token'),
showSession = function(response) {
var html = 'Not Connected';
if (response.authResponse) {
html = response.authResponse.accessToken;
}
pre.innerHTML = html;
};
FB.getLoginStatus(function(response) {
showSession(response);
FB.Event.subscribe('auth.sessionChange', showSession);
});
</script>
This example no longer works since the "offline_access" permission has been deprecated. More information can be found here:
https://developers.facebook.com/docs/offline-access-deprecation/
https://developers.facebook.com/docs/offline-access-deprecation/
Access Token:
AAAAAKvQdWksBAEsMjuBaAGWXsXGvEZBQTJY4BX7pVAZAXoto6UI5QxPmC7mtZCgYUJDYpBWaOYmeWmF3IYq9vKPgeZBXbeCzYgtalsMdMyUVVkrVi3ZCz