Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Graph Protocol - og:movie with youtube link

Wanted scenario:

  • people link to my website via Facebook
  • open graph data pops up (name, description, thumbnail, ...) (which works)
  • when you click the thumbnail a youtube video plays (which doesn't work)

Facebook seems to know that there is a video to be played, but doesn't want to go through with it.

My code:

<meta property="og:image" content="<url>" />
<meta property="og:site_name" content="<name>" />
<meta property="og:description" content="<description>" />
<meta property="og:video" content="http://www.youtube.com/v/S3_AwK3ujQI&fs=1" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<link rel="video_src" href="http://www.youtube.com/v/S3_AwK3ujQI&fs=1"  />
<meta name="video_type" content="application/x-shockwave-flash" />
<meta name="video_width" content="560" />
<meta name="video_height" content="315" />

What seems to be wrong? I read somewhere that the solution has to do something with SSL, but since I link to a external YouTube video that shouldn't be the case; or is it?

like image 466
Thijs Lowette Avatar asked Jan 17 '12 23:01

Thijs Lowette


1 Answers

You also need an og:picture. Using https for the video url will let it play for people who have Facebook on secure. Go to a youtube page and check out what they're using for og tags.

like image 60
Tom Kincaid Avatar answered Sep 22 '22 15:09

Tom Kincaid