• Hi
    Longshot but can anyone explain to me in very simple terms
    1)
    What is Facebook Open Graph image/video
    2)
    What is its application
    3)
    How do you set it up

    I wait in wonder and anticipation, hoping to learn something new!
    Kindest regards
    Phil

Viewing 2 replies - 1 through 2 (of 2 total)
  • I will give you one of my code, I call it “3 in 1 header”.
    You have favicon, title and Facebook Open Graph.

    <link rel="shortcut icon" href="FAVICON URL" />
    
    <title>
    <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php }
    elseif ( is_front_page() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php }
    else { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?>
    </title>
    
    <?php if (have_posts()):while(have_posts()):the_post(); endwhile; endif;?>
    <!-- Facebook Opengraph -->
    	<meta property="og:url" content="<?php the_permalink() ?>"/>
    <?php if (is_singular()) { ?>
    	<meta property="og:type" content="article" />
    	<meta property="og:title" content="<?php single_post_title(''); ?> | YOUR WEBSITE" />
    	<meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?> YOUR WEBSITE" />
    	<meta property="og:image" content="<?php $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large'); echo $thumb[0]; ?>" />
    	<meta property="og:image" content="IMAGE URL" />
    	<meta property="og:image" content="IMAGE URL" />
    <?php } else { ?>
    	<meta property="og:type" content="website" />
    	<meta property="og:site_name" content="YOUR WEBSITE" />
    	<meta property="og:description" content="YOUR WEBSITE" />
    	<meta property="og:image" content="IMAGE URL" />
    	<meta property="og:image" content="IMAGE URL" />
    <?php } ?>
    Thread Starter dalewood

    (@dalewood)

    Hi
    Thank you, not sure I fully understand what you have kindly sent me but I will study it!

    What I am trying to find is the following
    1)
    My sites ‘Open Graph Image’ URL
    2)
    My sites ‘Open Graph video’ URL

    Any guidance would be a blessing!
    Thank you again and take care
    Phil

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

The topic ‘Facebook 'Open graph image/video’ is closed to new replies.