Skip to content

Instantly share code, notes, and snippets.

@mpj
Created July 7, 2010 11:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpj/466598 to your computer and use it in GitHub Desktop.
Save mpj/466598 to your computer and use it in GitHub Desktop.
<div id="fb-root"></div>
<script>
$(document).ready(function() {
// Facebook
window.fbAsyncInit = function() {
FB.init({appId: '132860020070788', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
// Tell Google Analytics that we had a like!
_gaq.push(['_trackEvent', 'FacebookLikes', 'Root', 'Like of Root Page']);
});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/sv_SE/all.js';
document.getElementById('fb-root').appendChild(e);
}());
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment