Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author George Notaras

    (@gnotaras)

    Hello,

    Could you please be more specific about which meta tags you are referring to?

    George

    Plugin Author George Notaras

    (@gnotaras)

    If it’s just about video:tag meta tags, the generated opengraph metadata can be filtered and delete the meta tags you do not want. For example:

    function customize_og_suppress_videotag( $metatags ) {
        $metatags_new = array();
        foreach ( $metatags as $metatag ) {
            if ( strpos($metatag, 'video:tag') === false ) {
                $metatags_new[] = $metatag;
            }
        }
        return $metatags_new;
    }
    add_filter( 'amt_opengraph_metadata_head', 'customize_og_suppress_videotag' );

    Add this to the functions.php file of the theme.

    George

    Thread Starter paraglidingserbia

    (@paraglidingserbia)

    Hi,
    when I share link on FB, if in post have video, on FB will be published featured image with “play”. When I click on “play”, I just open that video from post from YT for expl, but not post. Can you tell me how to manage featured image when I share, not video from post.

    Thanks

    Thread Starter paraglidingserbia

    (@paraglidingserbia)

    I’ll trz it, thanks a lot

    Rika

    Plugin Author George Notaras

    (@gnotaras)

    This is an issue with how facebook deals with content that has an og:video meta tag. As far as I know there is no solution.

    I can think of two workarounds:

    1) Suppress og:video meta tags:

    function customize_og_suppress_ogvideo( $metatags ) {
        $metatags_new = array();
        foreach ( $metatags as $metatag ) {
            if ( strpos($metatag, 'og:video') === false ) {
                $metatags_new[] = $metatag;
            }
        }
        return $metatags_new;
    }
    add_filter( 'amt_opengraph_metadata_head', 'customize_og_suppress_ogvideo' );

    2) The second workaround is a trick I discovered the other day. If you provide a small image size of the featured image to facebook, then its own player preview is smaller and leaves room for the post excerpt to be displayed. I’ve tried this with a medium size (set to 368×0 in Settings->Media) and then use it in the metadata like this:

    function amt_use_medium_image_size_in_content_metadata( $size ) {
        return 'medium';
    }
    add_filter( 'amt_image_size_content', 'amt_use_medium_image_size_in_content_metadata' );

    Each workaround has its limitations. The choice is yours. 🙂

    George

    Plugin Author George Notaras

    (@gnotaras)

    I’m marking this topic as resolved.

    George

    Plugin Author George Notaras

    (@gnotaras)

    I am re-opening this topic because I think a setting to omit ‘og:video’ is really needed. This is the only way to resolve this.

    BTW, omitting the ‘og:video’ does not seem to affect the object even if it is marked as a ‘video.other’ type. At least the facebook debug tool does not show any validation errors.

    v2.8.1 will have an extra setting in the admin panel.

    Thanks for your feedback.

    George

    Plugin Author George Notaras

    (@gnotaras)

    Soon I’ll be releasing a new version with an option to omit og:video meta tags. If you have done more research about this issue, please let me know.

    George

    Plugin Author George Notaras

    (@gnotaras)

    Hi,

    2.8.1 has been released. The option to omit og:video meta tags exists in the Opengraph section of the plugin settings page. Please let me know if everything works as expected.

    Kind Regards,
    George

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Video tags’ is closed to new replies.