Skip to content

Instantly share code, notes, and snippets.

$(document).ready ->
$("#fb-root").append('<script type="text/javascript" src="'+ document.location.protocol +'//connect.facebook.net/en_GB/all.js" async="true"></script>')
window.fbAsyncInit = () ->
FB.init({appId: '172659579460514', status: true, cookie: true, xfbml: true})
FB.Event.subscribe('auth.login', (response) ->
FB.api('/me', (response) ->
$authorId = response.id
$authorName = response.name
FB.Event.subscribe('auth.logout', (response) ->
$authorId = ""