4

The Facebook login button is not displayed

 2 years ago
source link: https://www.codesd.com/item/the-facebook-login-button-is-not-displayed.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The Facebook login button is not displayed

advertisements

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?


According to the Facebook documentation if you have the show-faces attribute set to true and the user is already logged in, no login button will be shown. Try changing it to false 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/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK