Skip to content

Instantly share code, notes, and snippets.

@darkoverlordofdata
Created March 17, 2014 23:14
Show Gist options
  • Save darkoverlordofdata/9610311 to your computer and use it in GitHub Desktop.
Save darkoverlordofdata/9610311 to your computer and use it in GitHub Desktop.
Load Facebook JSSDK
# Load the SDK Asynchronously
do (d = document) ->
id = "facebook-jssdk"
ref = d.getElementsByTagName("script")[0]
return if d.getElementById(id)
js = d.createElement("script")
js.id = id
js.async = true
js.src = "//connect.facebook.net/en_US/all.js"
ref.parentNode.insertBefore js, ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment