0

I'm trying to set up my video in og:video on my site so that when someone shares the link in facebook it shows the video instead of the og:image.

The problem is that it requires a flash player url, but I don't have the slightest idea how to get that to work. All I have is the .mp4 file. I tried looking into jwplayer but all I got was an embed code which doesn't help.

I'm completely ignorant when it comes to this area. Any help would be greatly appreciated!

<meta property="og:video" content="https://???">
<meta property="og:video:height" content="281" />
<meta property="og:video:width" content="500" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
thinkofacard
  • 491
  • 1
  • 6
  • 19

1 Answers1

0

Originally Facebook accepted only Flash videos, but recently HTML5 support was added, so you can use the following:

<meta property="og:video" content="path_to_video.mp4" />
<meta property="og:video:type" content="video/mp4" />

<!-- Fallback alternative (If user's browser does not have HTML5 support) -->
<meta property="og:video" content="fallback/?video=path_to_video.mp4" />
<meta property="og:video:type" content="text/html" />

As you can see you can define multiple sources of a video with alternative types. Url fallback/?video=... should point to an empty page with embedded flas player in it which will read video path from the url (eg. using PHP or JS) and play it.

For this purpose you can use some free Flash video player... look here: http://www.instantshift.com/2010/05/14/21-free-video-players-for-your-website-and-blogs/

Martin Dendis
  • 523
  • 5
  • 9
  • Thank you for your response. The link you provided seems to go to a blank page. ANy idea why? – thinkofacard Nov 12 '15 at 18:34
  • Are you sure? The link http://www.instantshift.com/2010/05/14/21-free-video-players-for-your-website-and-blogs/ work to me just fine (even now). – Martin Dendis Nov 12 '15 at 22:37