I'm using facebook login on a site to make it easier for users to login or register but I just realised that the login button is not showing up if I'm logged in into facebook. If I log out, it's displayed the expected way.
It used to work before, maybe 2 months earlier but it does not work now.
The fb:login tag is used like this:
<fb:login-button onlogin="myJScript();" />
…
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '#{serviceBean.FACEBOOK_API_KEY}', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
So nothing special…
Has something changed in the usage of this fb:login?
Best Answer
According to the Facebook documentation if you have the
show-faces
attribute set totrue
and the user is already logged in, no login button will be shown. Try changing it tofalse
so the login button is shown even if the user is logged in.You can find more info here: https://developers.facebook.com/docs/reference/plugins/login/