Difficulty with OpenGraph for Facebook embedded video

妖精的绣舞 提交于 2019-12-10 10:43:21

问题


I am having some difficulty implementing a solution that I found via my research here (the actual accepted answer is not helpful and has been downvoted to Bolivian).

Problem: Facebook doesn't seem to recognize the OpenGraph meta tags that I have added to my Header.

What I know (or think I know): It is my understanding that by adding some appropriate opengraph meta tags, the content, such as YouTube video, should appear in the body of the "post" on Facebook.

What I have tried so far: Referring to the solution linked above, I have tried to implement this method.

In my examples, I'm embedding this video https://www.youtube.com/v/BQBjVr1iHH4 in the following page https://www.keithandthegirl.com/vip/bonus/episode/9/40/this-is-40 I would like Facebook to show the YouTube video whenever anyone shares my page on Facebook.

Option 1: setting the og:video to https://www.youtube.com/v/YOUTUBECODE

The meta tag will look like

<meta property='og:video' content='https://www.youtube.com/v/BQBjVr1iHH4' />

Further, I have attempted to disable plugins which may conflict with this -- any plugins which appear to add OG meta tags.

On the code side: I have hard-coded the following meta tags in the Header (this will eventually become a PHP function or something, but not until/unless I can make it work on a single post):

    <meta property='og:image' content='http://agnarchy.com/wp-content/uploads/2014/11/2014-11-01-22.02.37.jpg' />
    <meta property='og:video' content='https://www.youtube.com/v/dt6pPdz5eqg' />
    <meta property="og:video:height" content="854" />
    <meta property="og:video:width" content="510" />
    <meta property="og:type" content="video">

Observed behavior:

All I see is the post's featured image. When I schedule or submit this link to my facebook page, Facebook does not recognize the OpenGraph tags and does not render the embedded video as part of the content of this Facebook post:

Desired behavior:

This is at odds with the suggested method, which if I use the URL provided in that answer, I can see the embedded video player:

来源:https://stackoverflow.com/questions/27116133/difficulty-with-opengraph-for-facebook-embedded-video

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