• I’m trying to use either the “Embed Video” or “Embed Post” codes from Facebook to show a video on a WordPress post. The video itself won’t appear, and I don’t know why. I have scoured the web for other people complaining about this, but haven’t found anything – just lots of tutorials saying to do exactly what I did.

    You can see attempts of two different videos on this page: https://crashjapan.com/en/video-embed-test/ View Source on the page to see the codes that Facebook provided. Yes, I tried one of the stock themes (Twenty Fifteen) in case my theme was somehow hindering it – same result.

    The bit of HTML that doesn’t seem to do anything is:
    <div class="fb-video" data-allowfullscreen="1" data-href="/crashjapan/videos/vb.201131439904666/1067821006569034/?type=3">
    That’s apparently HTML5 Video, which I don’t have much experience with, but it seems like it should work. I tested in both Firefox and Chrome. Thoughts?

Viewing 1 replies (of 1 total)
  • I test it in localhost. It works fine for me. Put below code ideally right after the opening <body> tag. If you are using twentyfifteen theme then open header.php and paste the below code right after the <body> tag.

    <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.4&appId=590337977778760";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    And Place the below code wherever you want the plugin to appear on your page.

    <div class="fb-video" data-href="https://www.facebook.com/crashjapan/videos/1067821006569034/" data-width="500"></div>

    Please let me know this one helps you or not?

Viewing 1 replies (of 1 total)
  • The topic ‘Can't embed Facebook video’ is closed to new replies.