Sha256: 3cbf20539a03f73a62e990df5d0a3783966e04a0e21f71760763194c739ea261
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
<div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '<%=FB_APP_ID%>', // App ID channelUrl : '<%= FB[:base_url].gsub("http:", '').gsub('https:','') %>/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // Additional initialization code here FB.Event.subscribe('auth.login', function(response) { window.location="<%=FB_CALLBACK_URL%>"; }); FB.Event.subscribe('auth.logout', function(response) { // The user has logged out, and the cookie has been cleared window.location="<%=FB_CLOSED_URL%>"; }); }; // 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>
Version data entries
4 entries across 4 versions & 1 rubygems