JavaScript: Meu método fbAsyncInit () nunca é chamado
Estou copiando o código diretamente deesta págin no site do desenvolvedor do Facebook e o método fbAsyncInit () nunca é acionado. Eu também liesta págin, Ajustei o código de várias maneiras diferentes e não consigo acionar o método. Seus pensamentos
Além disso, pelo que vale a pena, quando tento executar esse código e o Chrome (no Mac) e executar o Firebug Lite, recebo um erro que diz "O Firebug Lite não pode ser carregado nesta página"
Aqui está o código ...
<html>
<head>
</head>
<body>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '1234567890', // App ID
channelUrl : '//localhost/test.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
alert("this statement never gets called either");
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
</script>
</body>
</html>