English 中文(简体)
Javascriptacebooklogin button don t change to logout afterlogin
原标题:Javascript Facebook Login button doesn t change to logout after login

Im 建立一个网站,Im 采用手法作为我的认证。 此前我曾这样做,然后回过。 然而,它现在没有发挥作用。 我可以记录和记录,但纽伦总是停留在“带有面板的log”。

I added autologoutlink="true", but it still doesn t work. Code below:

<fb:login-button autologoutlink="true" perms="">Login with Facebook</fb:login-button>  

如果能够帮助,这是我手法的其余部分:

<script src="http://connect.facebook.net/en_US/all.js"></script>  
<script>  
    FB.init({appId: XXXXXXXXXXX , cookie:true, 
            status:true, xfbml:true
    });   

    // log IN event
    FB.Event.subscribe( auth.login , function(response) {  
        alert("logged in");
        insertMyInfo(response);          
    });

    // log OUT event
    FB.Event.subscribe( auth.logout , function(response) {
        alert("logged off");   
    });                
</script>
最佳回答
问题回答

试图将“Facebook”文本删除。

       <fb:login-button autologoutlink="true" perms="">Login with Facebook</fb:login-button>

I mean it should look like this

   <fb:login-button autologoutlink="true" perms=""></fb:login-button>

The text will be automatically completed accordingly to the situation( Login or Logout). I don t know if you still need the answer since it s been a while since you asked the question but ...still, just in case :)

Please change scobe

scope="public_profile,email"

<fb:login-button scope="public_profile,email" onlogin="checkLoginState();" data-size="large" data-auto-logout-link="true"></fb:login-button>




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签