summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-11-15 00:15:59 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-11-15 00:15:59 -0500
commit6a3f69a311cd93c36757695a2b09a9a6d7456e87 (patch)
tree11424e21ada12d0f233439e0d847dd599c56240d
parent6eb767adc62f1013f0e03537947563695669c50f (diff)
downloadaskbot-6a3f69a311cd93c36757695a2b09a9a6d7456e87.tar.gz
askbot-6a3f69a311cd93c36757695a2b09a9a6d7456e87.tar.bz2
askbot-6a3f69a311cd93c36757695a2b09a9a6d7456e87.zip
fixed part of broken facebook login problem
-rw-r--r--askbot/skins/default/templates/authopenid/signin.html20
1 files changed, 11 insertions, 9 deletions
diff --git a/askbot/skins/default/templates/authopenid/signin.html b/askbot/skins/default/templates/authopenid/signin.html
index dbb5ace9..621cfdad 100644
--- a/askbot/skins/default/templates/authopenid/signin.html
+++ b/askbot/skins/default/templates/authopenid/signin.html
@@ -245,15 +245,17 @@
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
$(document).ready(function(){
- FB.init({appId: '{{settings.FACEBOOK_KEY}}', status: true, cookie: true, xfbml: true});
- FB.Event.subscribe('auth.sessionChange', function(response){
- if (response.session) {
- // A user has logged in, and a new cookie has been saved
- $('#signin-form').submit();
- } else {
- // The user has logged out, and the cookie has been cleared
- }
- });
+ if (typeof FB != 'undefined'){
+ var ret = FB.init({appId: '{{settings.FACEBOOK_KEY}}', status: true, cookie: true, xfbml: true});
+ FB.Event.subscribe('auth.sessionChange', function(response){
+ if (response.session) {
+ // A user has logged in, and a new cookie has been saved
+ $('#signin-form').submit();
+ } else {
+ // The user has logged out, and the cookie has been cleared
+ }
+ });
+ };
});
</script>
{% endif %}