0

I've been trying other people's examples of how to share a webpage with a video on it to facebook, and hoping that the video can play inline in the facebook wall. So far in each of my attempts, facebook only shows the meta information text of my webpage on the profile feed, but doesn't show a video. Here's my HTML code:

<!DOCTYPE html>
<html xmlns:og="http://ogp.me/ns#">
    <head>
        <title>Ocean Vid</title>
        <meta property="og:type" content="video" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video:width" content="500" />
        <meta property="og:video:height" content="500" />
        <meta property="og:video" content="https://mywebapp.com/video/oceans.mp4" />
        <meta property="og:video:secure_url"
              content="https://mywebapp.com/video/oceans.mp4" />
    </head>
<body>
</body>
</html>

What am I doing wrong?

John
  • 32,403
  • 80
  • 251
  • 422

1 Answers1

0

I got it working. From what I can tell, this is the minimum to get HTML5 video to post on facebook

<!DOCTYPE html>
<html>
    <head>
        <title>Ocean Video</title>
        <meta property="og:image" content="http://vjs.zencdn.net/v/oceans.png" />
        <meta property="og:type" content="video" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video" content="http://vjs.zencdn.net/v/oceans.mp4" />
        <meta property="og:video:secure_url" content="https://mycoolwebsite.com/video/oceans.mp4" />
    </head>
<body>
</body>
</html>

In my case, I needed to make sure I had both a thumbnail image and a secure_url for a video.

John
  • 32,403
  • 80
  • 251
  • 422