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

10,458

Solution 1

Add this to your document:

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

Solution 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.

Solution 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

Share:
10,458
Collector
Author by

Collector

Updated on November 20, 2022

Comments

  • Collector
    Collector over 1 year

    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?

  • Collector
    Collector over 13 years
    How is this different in the two pages I've sent? It's not inside an "a" tag and it's inside other elements because everything is always inside other elements. Thanks.
  • Raúl Leal
    Raúl Leal over 13 years
    When I opened colnect.com my browser redirected me to colnect.com/ca and all was working fine in IE. I've tried to open colnect.com/en but don't render the button because the page doesn't have the 'div' with id='fb-root'
  • Collector
    Collector over 13 years
    This has been there since long before the question was asked.
  • Jhourlad Estrella
    Jhourlad Estrella over 13 years
    you just saved me hours of hunt and peck debugging. That fixed it! Thanks a lot.
  • benz001
    benz001 over 12 years
    They would have left the http off deliberately - // allows it to work over both http and https.
  • Eskim0
    Eskim0 over 10 years
    good call. missed that - though I believe FB examples had http in there, plus they may now require https for all connections. not sure.