2

I decided to integrate the FB login/sharing capability to my website. However I am not able to make even the simple like script work as I get http//https protocol error:

Uncaught SecurityError: Blocked a frame with origin "https://staticxx.facebook.com" from accessing a frame with origin "http://www.my-site.com".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

The code I copy pasted from FB docs is:

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

<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

In fact I get the same error when I run the login script.

I looked at the answers here and here but they didnt work in my case.

Community
  • 1
  • 1
user1517108
  • 2,395
  • 6
  • 32
  • 43

1 Answers1

5

Got it. Thanks to this other question: Facebook Uncaught SecurityError

DISABLE 'RIPPLE EMULATOR' from chrome extensions.

Community
  • 1
  • 1
user1517108
  • 2,395
  • 6
  • 32
  • 43