Ich habe dies verwendet:
function FB_wait() {
if (typeof FB == 'undefined') {
window.setTimeout(FB_wait, 100);
} else {
more();
}
}
Aber es muss einen besseren Weg geben
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo $conf['fb']['appid']; ?>',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Canvas.setAutoResize();
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
Dies ist mein Init-Code..