Twitter button works in Chrome and Safari, but not IE or FX

I have a website which holds both Facebook and Twitter share buttons. When loaded in Chrome I see both, when loaded in IE and Firefox I only see the Facebook Share. These buttons use code generated directly from both developers website. Specifically my generated twitter code is:

<a id="someID" class="twitter-share-button" data-url="http://correct.url" data-via="" data-text="Some site specific text" href="">Tweet</a>
<script type="text/javascript">
!function (d, s, id)
{ var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); = id; js.src = p + '://'; fjs.parentNode.insertBefore(js, fjs); } } (document, 'script', 'twitter-wjs');

In the console of all browsers I get:

Received message of type object from,
expected a string

But chrome and safari still manage to load the Twitter Buttons. (Perhaps they auto convert the returned object to string)

More details:

  • The buttons are loaded via AJAX. I call twttr.widgets.load(); at
    the end of every Ajax call (in addition to the FB.XFBML.parse();).
  • I have removed all plugins/addons from browsers, and seen no change.
  • Using ASP.NET 4.5
  • Inspecting the DOM I see the twitter iframe with display:hidden

Any help is greatly appreciated.

Source: cross-browser

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.