Open Graph Protocol - og: movie with a link to YouTube

Required Scenario:

  • People link to my site through Facebook.
  • open graph data pops up (name, description, sketch, ...) (which works)
  • when you click the thumbnail, the YouTube video plays (which does not work)

Facebook seems to know that there is a video that needs to be played, but does not want to go through it.

My code is:

<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 wrong? I read somewhere that the solution should do something with SSL, but since I am linking to an external YouTube video, which should not be; or that?

+6
source share
1 answer

You will also need an og: image. Using https for the video will allow him to play for people who have Facebook safe. Go to the youtube page and check what they use for og tags.

+1
source

Source: https://habr.com/ru/post/906241/


All Articles