Facebook share dialog window doesn't load when data-mobile-iframe is set to true

Viewed 607

I've implemented a facebook share button on my website and the share dialog doesn't load on mobile phone browsers when data-mobile-iframe="true". if I set it to "false" then it works by opening another tab on the browser. When set to "true", all I see is a loading icon, a cancel text and a transparent overlay.

I tried Chrome, Firefox and Dolphin as those are the ones I have installed on my phone.

<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/es_ES/sdk.js#xfbml=1&version=v2.10";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

And the button

<div class="fb-share-button" data-href="http://url-to-share" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Furl-to-share.com%2F&amp;src=sdkpreparse">Share</a></div>

Any ideas why it doesn't work with mobile iframe on? I mean, I could NOT use mobile iframe but I wanted to save the users from having to navigate to another window to share the content.

1 Answers
Related