Facebook Like button not working in IE8 or IE9

I already banged my head about it during the day and finally ask a question because I can’t understand this and can’t find any information from people who are experiencing the same problem.

These similar buttons work fine in Chrome, Firefox, IE7, but NOT in IE8 and IE9.

Do you have any of you Facebook gurus have any ideas what is going on here? The buttons work fine.

But for this page in IE8 and IE9, if you are not logged in to Facebook, you will receive a pop-up window asking you to log in. After a successful login, you will be redirected (the link to your url is mine instead): http://www.facebook.com/connect/connect_to_external_page_widget_loggedin.php?social_plugin=like&external_page_url=http%3A%2F%2Fwebhooks.digitas.com % 2Flike.html # =

If you are already logged in, you will go directly to this URL. As you can see, a page never ends everything that it should do.

I just don’t understand how the button can work during the production process, but not on this test page .....

My test page contains 3 buttons that are taken directly from the button code generator.

<!doctype html> <html xmlns:fb="https://www.facebook.com/2008/fbml"> <head> </head> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-href="http://webhooks.digitas.com/like.html" data-send="false" data-layout="button_count" data-width="200" data-show-faces="false"></div> <fb:like href="http://webhooks.digitas.com/like.html" send="false" layout="button_count" width="200" show_faces="false"></fb:like> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwebhooks.digitas.com%2Flike.html&amp;send=false&amp;layout=button_count&amp;width=200&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe> </body> </html> 

The testing page is at http://webhooks.digitas.com/like.html

I also created another one using the alternative method for downloading the Facebook JS SDK, which currently works on our site:

 <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId: '168861203149296', status: true, cookie: true, xfbml: true }); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); } ()); </script> 
+4
source share
1 answer

There you will need two things to help.

1) In FB.init you must set ChannelUrl. 2) In the headers sent by your web server, you must specify the P3P header. See here how to implement: http://www.hanselman.com/blog/TheImportanceOfP3PAndACompactPrivacyPolicy.aspx

0
source

All Articles