Publicize sometimes posts wrong image to Facebook
-
Publicize sometimes posts wrong image to facebook but not everytime.
I suspect that this code at my theme header.php has to do with it:<?php if (! is_404() ) { $thumbnail_id = get_post_thumbnail_id(); if( !empty($thumbnail_id) ){ $thumbnail = wp_get_attachment_image_src( $thumbnail_id , '440x280' );?> <meta property="og:image" content="<?php echo esc_attr($thumbnail[0])?>" /> <?php } } wp_head(); ?> <!-- end head -->So i was wondering if you can help whats wrong with this code and fix so publicize uses the right image.
also maybe this code at the theme functions.php can help to understand much more:
} add_action('init', 'jellywp_register_menu'); add_filter( 'widget_text', 'do_shortcode' ); add_theme_support('post-thumbnails'); add_theme_support( 'automatic-feed-links' ); // Post thumbnail support if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); add_image_size('slider-large', 1140, 540, true); add_image_size('slider-normal', 670, 460, true); add_image_size('slider-small', 240, 140, true); add_image_size('feature-grid', 250, 242, true); add_image_size('small-grid', 171, 108, true); add_image_size('medium-feature', 400, 260, true); add_image_size('small-feature', 100, 75, true); add_image_size('slider-feature', 735, 400, true); }Thank you.
ps. I forget to write that at https://developers.facebook.com/tools/debug/ the posts which publicize gets wrong image are always with the right image. And the only error that show at debug tool is:
fb:app_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when open the share dialog. Otherwise, the default app id( 966242223397117 ) will be assigned.
The topic ‘Publicize sometimes posts wrong image to Facebook’ is closed to new replies.