除非禁用SSL,否则无法在Facebook墙上播放嵌入式视频 [英] Cannot play embedded videos on facebook wall unless SSL is disabled

查看:107
本文介绍了除非禁用SSL,否则无法在Facebook墙上播放嵌入式视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将视频(非You Tube)嵌入Facebook墙上,以便用户单击它们时,视频可以在墙上播放.发生的事情是:如果用户未登录或已禁用SSL,则它可以正常工作.但是,如果他们使用"https:"方案安全地访问页面,或者如果他们启用了SSL进行登录,则当他们单击视频时,会启动一个新标签,其中包含视频所在页面的地址.

我已经研究了这个问题.我有两个解决方案,分别是更新页面上的OpenGraph元数据和提供页面的SSL启用版本.我尝试添加og元数据-最初我尝试仅添加以下内容:

<meta property="og:video" content="http://example.com/awesome.swf" />
<meta property="og:video:height" content="640" />
<meta property="og:video:width" content="385" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

那是行不通的,facebook调试器抱怨缺少一些元数据标签,因此我添加了这些标签(类型,URL等).现在,当我通过调试器运行它时,我没有收到任何警告,并且现在报告:

在Facebook上共享此URL时,会将其视为某种类型.通过在此页面上放置元标记,您可以影响其共享方式. 视频 状态启用视频嵌入Facebook

我被阻止继续进行.在上司回来之前,我可以对SSL进行任何处理,但是,考虑到禁用SSL时视频可以正常工作,我看不出这有什么用.

解决方案

您需要添加一个元标记,详细说明视频的安全URL所在的位置:

<meta property="og:video:secure_url" content="https://some/awesome.swf" />

有关更多信息,请参见 https://developers.facebook.com/docs/opengraph/信息.

I am trying to embed (non-You Tube) videos on a Facebook wall so that when the user clicks on them, the video plays on the wall. What's happening is: if the user is not logged in or has SSL disabled, it works. However, if they access the page securely with an "https:" scheme or if they are logged in with SSL enabled, when they click on the video, a new tab is launched with the address of the page where the video resides.

I have researched this problem. The two solutions I have are, updating the OpenGraph metadata on the page and providing an SSL enabled version of the page. I have tried adding og metadata - initially I tried just adding the following:

<meta property="og:video" content="http://example.com/awesome.swf" />
<meta property="og:video:height" content="640" />
<meta property="og:video:width" content="385" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

That didn't work, and the facebook debugger was complaining about a few missing metadata tags, so I added those (type, url, etc.). Now when I run it through the debugger, I don't get any warnings, and it now reports:

When this URL is shared on facebook, it is treated as a certain type. By putting meta tags on this page, you can influence how it is shared. Video status Video embedding on Facebook enabled

I am blocked from proceeding. I can do anything about the SSL until my boss gets back, however, I don't see how that matters, considering the video works properly when SSL is disabled.

解决方案

You need to add a meta tag detailing where the secure URL for your video is:

<meta property="og:video:secure_url" content="https://some/awesome.swf" />

See https://developers.facebook.com/docs/opengraph/ for more info.

这篇关于除非禁用SSL,否则无法在Facebook墙上播放嵌入式视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆