views:

30

answers:

1

Hi!

I'm trying to set up a page which can be properly scraped by Facebook when it's shared/liked. The page will have a YouTube video associated with it, so in the content attribute of the og:video tag, should I put the YouTube video embed link or the actual youtube page link for it to appear on Facebook with the little "Preview" button that plays the video in Facebook?

Hope someone can help! Thanks!

A: 

Hey! I figured it out. I had a look at how Collegehumor.com does it and they include a bunch of stuff not mentioned in the Facebook API. Rather than just the following:

<meta name="og:video" content="whatever"></meta> <meta name="video_style" content="whatever"></meta> <meta name="video_height" content="whatever"></meta> <meta name="video_width" content="whatever"></meta>

you also need link rel="video_src" and it helps to have "videothumbnail" and "og:image" too - I'm not entirely sure which one did it but there you go. That works :)

Daniel Hough

related questions