Created
October 22, 2011 16:18
-
-
Save matclayton/1306158 to your computer and use it in GitHub Desktop.
Is Facebook Connect for me?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id=”fb-root”></div> | |
<script> | |
window.fbAsyncInit = function(){ | |
FB.init({ appId:‘YOUR ID’, status:true, cookie:true, xfbml:true}); | |
FB.getLoginStatus(function(response){ | |
_gaq.push([‘_trackEvent’, ’FB’, ‘status’, response.status]); | |
}); | |
}; | |
// Load the SDK Asynchronously | |
(function(d){ | |
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} | |
js = d.createElement('script'); js.id = id; js.async = true; | |
js.src = "//connect.facebook.net/en_US/all.js"; | |
d.getElementsByTagName('head')[0].appendChild(js); | |
}(document)); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment