]> git.openstreetmap.org Git - osqa.git/commitdiff
init the Facebook api inside check_login_status() method. This used to cause troubles...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 13 Jul 2011 09:24:33 +0000 (09:24 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 13 Jul 2011 09:24:33 +0000 (09:24 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1115 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/facebookauth/templates/button.html

index db61aa2ea4ce0ed355ff3eda2d93dbc50e3c841d..a634d1d17639288e449e71f9d9d2908f07577fe1 100644 (file)
@@ -3,13 +3,12 @@
 <div id="fb-root"></div>\r
 <script src="http://connect.facebook.net/en_US/all.js"></script>\r
 <script>\r
 <div id="fb-root"></div>\r
 <script src="http://connect.facebook.net/en_US/all.js"></script>\r
 <script>\r
-    var FB_API_KEY = "{{ provider.API_KEY }}";\r
-    FB.init({\r
-        appId:FB_API_KEY, cookie:true,\r
-        status:true, xfbml:true\r
-    });\r
-\r
     function check_login_status() {\r
     function check_login_status() {\r
+        var FB_API_KEY = "{{ provider.API_KEY }}";\r
+        FB.init({\r
+            appId:FB_API_KEY, cookie:true,\r
+            status:true, xfbml:true\r
+        });\r
         FB.getLoginStatus(function(response) {\r
             if (response.session) {\r
                 redirect_to_done_page();\r
         FB.getLoginStatus(function(response) {\r
             if (response.session) {\r
                 redirect_to_done_page();\r