problems with IE8 (Internet Explorer) only

2019-01-20 09:51发布

问题:

On my site I've implemented Facebook login button and it works well on all browsers except IE. Not sure why on IE it doesn't work well. You can see it broken on the main page of my website http://colnect.com with the following Javascript error:

Message: Unknown runtime error
Line: 43
Char: 729
Code: 0
URI: http://connect.facebook.net/en_US/all.js

On two other pages with the exact same FBML code http://colnect.com/en/account/create and http://colnect.com/en/sfGuardAuth/signin the button appears and works well.

Any ideas?

回答1:

Add this to your document:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">


回答2:

I had same problem because I put "fb:login-button" inside an "a" tag. If you have the fb button inside another element, try to leave it.



回答3:

I just saw the same thing < curse_m$_ie tag > and was able to fix it by properly hooking up a channel file. From https://developers.facebook.com/docs/reference/javascript/:

Channel File

The channel file addresses some issues with cross domain communication in certain browsers. The contents of the channel.html file can be just a single line:

<script src="//connect.facebook.net/en_US/all.js"></script>

Ok, so I think they meant to add a http: at the front of that, anyway, that's what it took for me to get it working. Then you need to reference the channel file in your FB.init - well, see their page for this but it's generally:

<script>   
window.fbAsyncInit = function() {
FB.init({
appId      : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
...

Hope this is helpful to whoever is pulling their hair out on this right now. And hope it works for others besides me!

Oh, also just found this link on the subject: http://blog.tiecliphq.com/2011/06/ie8-facebook-xd-proxy-fix.html