Shared Facebook video is not displayed inline in wall posts for HTTPS users

ぐ巨炮叔叔 提交于 2019-12-13 15:57:02

问题


I have an application with a Like button. Once I click Like, a post, including a video link, goes to my facebook wall. If I turn off facebook security (all FB pages are opened through insecure http), i can play video embedded into my facebook wall. But once security is on clicking my video thumbnail opens a new tab instead of embedded player.

How can I make video play the same way regardless facebook security.

Looks like it's possible: YouTube pages have essentially the same OGraph tabs included, but their player always opens embedded into my wall regardless FB security settings.


回答1:


You may need to specify the HTTPS source of your video, see here: https://developers.facebook.com/blog/post/602/

and the docs: https://developers.facebook.com/docs/opengraph/#audiovideo

An example of how to specify the secure URL is: <meta property="og:video:secure_url" content="https://secure.example.com/awesome.swf"/>

I think youtube is a special case and everyone else needs to manually specify the HTTPS URL in order for the content to be displayed inline for HTTPS users



来源:https://stackoverflow.com/questions/8267543/shared-facebook-video-is-not-displayed-inline-in-wall-posts-for-https-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!