2

I am getting a javascript error for the FB Share button only in IE8. This started after the old Share button was disabled and subsequently re-enabled (see Facebook Share button: is it officially dead?)

The error I am getting is:

Message: Object doesn't support this property or method
FB.Share                                                    Line: 128
Code: 0                                                     Char: 188
URI: http://static.ak.fbcdn.net/connect.php/js/FB.Share

Any ideas on how to fix this?

Community
  • 1
  • 1
inarilo
  • 804
  • 1
  • 9
  • 14

4 Answers4

0

How about doing it this way?

http://www.facebook.com/sharer.php?s=100&p[title]=SHARE%20ME&p[summary]=SOME%20CONTENT&p[url]=http://www.google.com&p[images][0]=http://fakeurl.com/shareImage.gif

Breakdown:

http://www.facebook.com/sharer.php?s=100 - MAIN URL
&p[title]=SHARE%20ME - SHARE TITLE
&p[summary]=SOME%20CONTENT - SHARE PARAGRAPH
&p[url]=http://www.google.com - URL TO SHARE
&p[images][0]=http://fakeurl.com/shareImage.gif - SHARE IMAGE THUMBNAIL

Barrie Reader
  • 10,647
  • 11
  • 71
  • 139
0

I had a similar issue and removing the following line worked for me after hours of searching online.

<meta http-equiv="X-UA-Compatible" content="IE=7"/>
the sandman
  • 1,019
  • 3
  • 12
  • 32
0

I used a slightly modified version of the answer in the link I gave originally:

<html xmlns:fb="http://ogp.me/ns/fb#" lang="en">
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
  </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&appId=YOUR_APP_ID"; // appId must be valid
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <fb:share-button type="button" href="http://www.foobar.com"></fb:share-button>
  </body>

inarilo
  • 804
  • 1
  • 9
  • 14
0

What I found is that if you can set IE8 in protected mode by selecting Internet options -> Security ->Trusted Sites ->Enable Protected Mode, the page is working fine.

Sofia Khwaja
  • 1,909
  • 3
  • 17
  • 20