From 4bbba8b57f84fd06386f7c4b8e39acc31974091d Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Sun, 20 Mar 2011 00:15:42 +0200 Subject: some more small changes --- fb/templates/fb_js.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'fb/templates/fb_js.html') diff --git a/fb/templates/fb_js.html b/fb/templates/fb_js.html index 199281c..da728ac 100644 --- a/fb/templates/fb_js.html +++ b/fb/templates/fb_js.html @@ -1,11 +1,23 @@
- - \ No newline at end of file + window.fbAsyncInit = function() { + FB.init({ + appId: '{{ FACEBOOK_APP_ID }}', + status: true, + cookie: true, + xfbml: true + }); + + FB.Event.subscribe('auth.sessionChange', function(res) { + if (res.session) { + alert('authenticated!'); + } + }); + }; + (function() { + var e = document.createElement('script'); e.async = true; + e.src = document.location.protocol + + '//connect.facebook.net/en_US/all.js'; + document.getElementById('fb-root').appendChild(e); + }()); + -- cgit v1.3.1