开发者

fbAsyncInit is not Firing

开发者 https://www.devze.com 2023-04-04 06:55 出处:网络
See this Page Tab (its only a test page, just fan it :-) htt开发者_C百科p://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_165323306883725

See this Page Tab (its only a test page, just fan it :-)

htt开发者_C百科p://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_165323306883725

its working in FF. But not in IE.

You should see 2 Alert boxes, one from fbAsyncInit and one from getLoginStatus. in IE neither ist coming. but now to the funny part. Press F12 to open the DeveloperTools from IE. and click on "iPad Gewinnspiel" again. now its working.

Right klick on the icon of "iPad Gewinnspiel" to open the page in a new tab. -> not working. again with F12 and it will work.

Does anyone have any idea what i could do to fix this ? TIA


You need to initialise the FB object inside the async function

window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_ID', 
status : true, 
cookie : true, 
xfbml : true,
oauth: true
});

// Do stuff with FB object here
} 


I should really not use console.log in the code when i want to test IE.....

as soon as this for IE unknown commands are out of the code is working as expected.

Funny enough when the developer console is open this function exists and are working. stupid IE developer who thought of such nonsense.

see What happened to console.log in IE8? for more information.

0

精彩评论

暂无评论...
验证码 换一张
取 消