Boton login facebook no funciona javascript ayuda

  • Autor Autor Carambel
  • Fecha de inicio Fecha de inicio
Carambel

Carambel

Ómicron
Social Media
Verificado
Verificación en dos pasos activada
Verificado por Whatsapp
Hola a todos que puede estar mal en mi codigo login facebook en javascript simple para unas pruebas pero me sale asi les dejo el codigo y como me sale:

Codigo:

HTML:
 <html>
  <head>
   <title>My Facebook Login Page</title>
  </head>
  <body>

    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
          FB.init({
            appId      : '148146716549XXXX', // App ID
            channelUrl : '//miwebopage.com/', // Channel File
            status     : true, // check login status
            cookie     : true, // enable cookies to allow the server to access the session
            xfbml      : true  // parse XFBML
          });
          FB.api('/me', function(user) {
            if (user) {
              var image = document.getElementById('image');
              image.src = 'https://graph.facebook.com/' + user.id + '/picture';
              var name = document.getElementById('name');
              name.innerHTML = user.name
            }
          });
        };
        // Load the SDK Asynchronously
        (function(d){
           var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
           if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           ref.parentNode.insertBefore(js, ref);
         }(document));
    </script>

    <div align="center">
      <img id="image"/>
      <div id="name"></div>


Imagen:

7EVuwAy.png


Ayuda no se que puede estar mal 🙁
 
Atrás
Arriba