Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7222

    Hello!

    I am using Display theme.

    When I share url from one of my portfolio posts on facebook – it shows wrong thumbnail picture, not from this post.

    I try to use this plugins:

    - Facebook Thumbnails

    - Easy Facebook Share Thumbnails

    - Fix Facebook Like

    ,but it show me several other pictures or my gravatar, but still wrong.

    I want see the right post thumbnail when sharing post url on FB, please, can you help me, what I need to do?

    Thanks!

    #57186

    Foget to add link:

    http://kontramax.com/portfolio/hobbie

    try to start share any post url and thumbnail will always wrong, why?

    #57187

    Please somebody help me with suggestion?

    #57188

    Hey,

    to be honest I’m not sure why the plugins fetch the wrong image. You can try Slatelunchs open graph meta here: http://www.kriesi.at/support/topic/facebook-open-graph-protocol#post-23893

    <!-- Facebook Opengraph -->
    <meta property="fb:app_id" content="My Application ID" />
    <meta property="fb:admins" content="My Admin ID" />
    <?php if (is_single()) {

    $preview_small = get_post_meta($post->ID, "_preview_small", true);
    $preview_medium = get_post_meta($post->ID, "_preview_medium", true);
    $preview_big = get_post_meta($post->ID, "_preview_big", true);

    //defaults:
    $preview = $preview_small;
    $link_url = $preview_big;
    $lightbox = 'boxes';
    $link = true;
    //change if necessary:

    // resizing? => take next sized picture
    if ($k_option['general']['tim'] == "1" && $preview_small == "")
    {
    $preview = $preview_medium != '' ? $preview_medium : $preview_big;
    }

    if (!kriesi_is_file($preview_big,'image'))
    {
    $preview = $preview_small != '' ? $preview_small : $preview_medium;
    $link_url = $preview_big;
    }

    // no bigpicture? => no lightbox
    if ($preview_big == "" || $k_option['portfolio']['portfolio_click'] == 2) { $lightbox = ''; $link = true; $link_url = get_permalink(); }
    // the kriesi_build_image function used here checks if the image should be resized.
    // the function is located in framework/helper_functions

    $preview = kriesi_build_image(array('url'=>$preview,
    'height'=> '124',
    'width'=> '280',
    'lightbox'=>$lightbox,
    'link'=>$link,
    'link_url'=>$link_url
    ));

    ?>
    <meta property="og:url" content="<?php the_permalink() ?>"/>
    <meta property="og:title" content="<?php single_post_title(''); ?>" />
    <meta property="og:description" content="<?php the_excerpt_rss() ?>" />
    <meta property="og:type" content="article" />
    <meta property="og:image" content="<?php echo $preview; ?>" />
    <?php } else { ?>
    <meta property="og:site_name" content="My Website Name" />
    <meta property="og:url" content="http://myurl.com"/>
    <meta property="og:description" content="<?php bloginfo('description'); ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:image" content="http://A default image url for the website.com" />
    <?php } ?>

    Adjust the admin id, etc. and add the meta tags before the body tag in header.php.

    #57189

    Thanx for the reply, I will try it.

    #57190

    I hope it works :)

    #57191

    Well, when I insert code in header.php it show me post thumbnail in any post at top-left of screen on site. Also I don’t know what is and where I can get my “My Application ID”… I have many customized changes make with this Display theme and probably broke something, so I will just leave all as is.

    Thanx for response anyway!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Wrong post thumbnails when sharing on Facebook’ is closed to new replies.