Difficulty with OpenGraph for Facebook embedded vi

2019-05-28 21:40发布

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:

enter image description here

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:

enter image description here

0条回答
登录 后发表回答