Garmaine Staff asked 2 years ago

I just followed the steps in the official documentation and added this script to my index.html

<script>
    window.fbAsyncInit = function () {
      FB.init({
        appId: "{my-app-id}",
        autoLogAppEvents: true,
        xfbml: true,
        version: 'v6.0'
      });

      FB.AppEvents.logPageView();
    };

    (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 = "https://connect.facebook.net/en_US/sdk.js";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>

Then when I load the page in the browser the firefox console shows me the following

Loading failed for the <script> with source “https://connect.facebook.net/en_US/sdk.js”.

But the same code in google chrome works perfectly.

Extra info.

  • Firefox version 75.0

  • Google chrome version 80.0.3987.163