wordpress サイトで、sharethis プラグインを使用しています...
http://support.sharethis.com/customer/portal/articles/446440-wordpress-integration
FB共有リンクボタンがFacebookの投稿の説明と画像を取得して表示しない場所。
何が間違っている可能性がありますか?
wordpress サイトで、sharethis プラグインを使用しています...
http://support.sharethis.com/customer/portal/articles/446440-wordpress-integration
FB共有リンクボタンがFacebookの投稿の説明と画像を取得して表示しない場所。
何が間違っている可能性がありますか?
この関数を functions.php ファイルに追加してください。
function wpc_fb_opengraph() {
$wpc_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
?>
<meta property="og:title" content="<?php the_title(); ?>" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
<meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />
<meta property="fb:app_id" content="APP ID HERE">
<meta property="fb:admins" content="YOUR FB USER ID (OR USERNAME) HERE"/>
<meta property="og:image" content="<?php echo $wpc_image_url[0] ?>"/>
<?php }
add_action('wp_head', 'wpc_fb_opengraph');
注: Web ページ用の Facebook アプリがまだない場合は、この行を使用する必要はありません。
<meta property="fb:app_id" content="APP ID HERE">
<meta property="fb:admins" content="YOUR FB USER ID (OR USERNAME) HERE"/>
ハッピーワードプレス..
まだ実装していない場合は、Open Graph メタ タグを実装してみてください。自動的に解析できない場合は、Facebook のサーバーに、表示したいコンテンツに関するヒントが与えられます。