Login
Status:
waiting
|
Disconnect
|
Logout
<div id="authResponse"></div> <script> var div = document.getElementById('authResponse'), showAuthRecord = function(response) { if (!response.authResponse) { div.innerHTML = '<em>Not Connected</em>'; } else { var html = '<table>'; for (var key in response.authResponse) { html += ( '<tr>' + '<th>' + key + '</th>' + '<td>' + response.authResponse[key] + '</td>' + '</tr>' ); } div.innerHTML = html; } }; FB.getLoginStatus(function(response) { showAuthRecord(response); FB.Event.subscribe('auth.authResponseChange', showAuthRecord); }); </script>
Examples
Run Code
Website
Canvas
Page Tab
Clear