<script> function twitterSessionsPresent(state) { console.log(state); } </script> <script src='https://api.twitter.com/sessions/present.js?callback=twitterSessionsPresent'></script>