<script src="http://platform.twitter.com/anywhere.js?id=API_KEY&v=chirp_preview"></script> <script> twttr.anywhere.config({ assetHost: 'twitter-anywhere.s3.amazonaws.com' }); twttr.anywhere(function(T) { if (T.isConnected()) { // your app! } else { T('#login').connectButton(); } }); </script>