logout button in FaceBook SDK

Niklas Hultgren picture Niklas Hultgren · Apr 15, 2011 · Viewed 30.8k times · Source

I have this fb-login button on my website and it works pretty okay. How can I implement an logout button? Below is my code for the login part.

<fb:login-button size="small" onlogin="RedirectLogon();" perms="email,user_birthday" autologoutlink="true">
    <%=LanguageManager.Instance.Translate("root/facebook/login")%>
</fb:login-button>

Answer

magicode118 picture magicode118 · Nov 28, 2013

If you want to implement such buttons into one multifunctional button, use this:

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

Note that if you add any custom code to the above line, the button won't work.