diff options
Diffstat (limited to 'askbot/skins/default/templates/authopenid/signin.html')
-rw-r--r-- | askbot/skins/default/templates/authopenid/signin.html | 20 |
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 %}
|