Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<fb:login-button> problems with IE8 (Internet Explorer) only

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?

like image 495
Collector Avatar asked Nov 07 '10 06:11

Collector


3 Answers

Add this to your document:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
like image 80
Danny Avatar answered Oct 23 '22 10:10

Danny


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.

like image 4
Raúl Leal Avatar answered Oct 23 '22 12:10

Raúl Leal


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

like image 2
Eskim0 Avatar answered Oct 23 '22 12:10

Eskim0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!