misterben
misterben

Reputation: 7821

How can I use Open Graph so Facebook embeds a swf in the wall when viewed in https?

I've implemented opengraph as per the Facebook doumentation to embed a video swf on the wall when the page is shared, e.g.

<meta property="og:video" content="http://example.com/awesome.swf" />

This works as intended when Facebook is viewed over http. However when Facebook is viewed over https, the video displays in a new window rather than embedded. This is clearly to avoid browser mixed-mode warnings. I can replace the url in og:video with an https link to the swf, and that does play whether Facebook is viewed over http or https, e.g.

<meta property="og:video" content="https://example.com/awesome.swf" />

While that works, always retrieving the swf over https is not a good solution because https comes at a performance cost. What I need is for the swf to be loaded from an http url when Facebook is viewed over http and an https url when Facebook is viewed over https. It works like this for some sites, e.g. YouTube and Vimeo. Neither of those appear to have anything special in their Open Graph markup that gives the https path.

Is there something I can do, or does Facebook treat Vimeo and YouTube as special cases?

Upvotes: 1

Views: 3239

Answers (1)

Simon Cross
Simon Cross

Reputation: 13345

We (Facebook) have now launched a solution for this. See https://developers.facebook.com/blog/post/602/

Upvotes: 2

Related Questions