WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Open graph not working (1 post)

  1. cambridge15
    Member
    Posted 1 year ago #

    Hi there, I'm having trouble with my site I just launched today.

    http://www.neato.me

    The links are returning no meta Open Graph data when I paste them onto facebook, no titles or images or content. It's been driving me nuts!! The like buttons do not work either, and I'm guessing they are related??

    here's what i'm using for the meta tags, but i've used just about everything! When I view source on the homepage, it looks correct as well but does not show up when pasting the link.

    <meta property="og:title" content="<?php if (is_home () || is_front_page() ) {
       bloginfo('name');
    } elseif ( is_category() ) {
        single_cat_title(); echo ' | ' ; bloginfo('name');
    } elseif (is_single() ) {
       single_post_title();
    } elseif (is_page() ) {
      single_post_title();  echo ' | ';   bloginfo('name');
    } else {
       wp_title('',true);
    } ?>"/>
    <meta property="fb:admins" content="00000000"/>
    <meta property="og:type" content="<?php if (is_single() || is_page()) { echo "article"; } else { echo "website";} ?>" />
    <meta property="og:url" content="<?php the_permalink(); ?>"/>
    <meta property="og:site_name" content="<?php bloginfo('name'); ?>"/>
    <?php if (  (is_home()) || (is_front_page())  ) { ?>
    <meta property="og:description" content="Blue Peak Digital build effective web presences for political campaigns, organizations, and companies."/>
    <?php } elseif (is_single() || is_page() ) { ?>
    <meta  property="og:description" content="<?php the_excerpt_rss(); ?>" />
    <?php } ?>
    <meta property="og:image" content="<?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ) ) ?>" />

    Here's the code i'm using inside index.php for the like button on individual posts;
    <fb:like href="<?php echo the_permalink(); ?>" send="false" layout="button_count" width="50" show_faces="false"></fb:like>

    Thank you for any and all help, I greatly appreciate it!!

Topic Closed

This topic has been closed to new replies.

About this Topic