今流行のfacebook「いいね」ボタンをつけることにした。
 
 最初下記のプラグインを試したが、文字化けが解消しないため、プラグインをアンインストールして直接テーマに書きこむことにした。後で気がついたのだが、文字化けが解消しないのは、facebook側のキャッシュが問題だった。こちらの記事で多分不具合無く、実装が可能だと思う。
 
 {「Facebook Like Button 5.9.5」WPプラグインは、いいねボタン設置とOGP設定の両方を設定してくれる優れもののFacebook用プラグイン}
 http://www.taskmother.com/wordpress/699.html
 
 最終的には、プラグインに頼らず、手作りで対処した。

まず、テーマの
 header.phpに赤字部分を挿入
 xxxxxxxxxxxxxxxxxxxx
 zzzzzzzzzzzzzzzzzzzz
 は取得したシリアルになります。
 ***********************************************************************
 </title>
 <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
 <meta property="og:title" content="<?php the_title(); ?>">
 <meta property="og:type" content="blog">
 <meta property="og:url" content="<?php the_permalink() ?>">
 <meta property="og:description" content="<? echo mb_substr(str_replace(array("\r\n","\r","\n"), '', strip_tags($post->post_content)), 0, 70); ?>">
 <meta property="og:site_name" content="<?php bloginfo('name'); ?>">
 <meta property="fb:app_id" content="xxxxxxxxxxxxxxxxxxxx">
 <meta property="og:locale" content="ja_JP">
 <?php
 $str = $post->post_content;
 $searchPattern = '/<img.*?src=(["\'])(.+?)\1.*?>/i';
 if ( preg_match( $searchPattern, $str, $imgurl ) ) {
 echo '<meta property="og:image" content="'.$imgurl[2].'">';
 } else {
 echo '<meta property="og:image" content="">';
 };
 ?>
 
 <link rel="stylesheet" href="/<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
 <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="/<?php bloginfo('rss2_url'); ?>" />
 <link rel="pingback" href="/<?php bloginfo('pingback_url'); ?>" />
 ***********************************************************************
 index.phpに赤字部分を挿入
 ***********************************************************************
 ??? ??? </div> <!-- close div.entrybody -->
 
 <script type="text/javascript"><!--mce:1--></script>
 <div id="fb-root"></div>
 <script>(function(d, s, id) {
 ? var js, fjs = d.getElementsByTagName(s)[0];
 ? if (d.getElementById(id)) {return;}
 ? js = d.createElement(s); js.id = id;
 ? js.src = "//connect.facebook.net/ja_JP/all.js#appId=xxxxxxxxxxxxxxxxxxxx&xfbml=1";
 ? fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'facebook-jssdk'));</script>
 <fb:like href="/<?php the_permalink(); ?>" send="true" layout="button_count" width="300" show_faces="true" font="verdana"></fb:like>
 
 <p style="clear: both"></p>
 ??? </div> <!-- close div.entry -->
 ***********************************************************************
 参考サイト
WordPressでFacebookのいいね!ボタンを不具合無く設置する際のポイント
http://www.yusk.org/memo/wp/facebook_likebutton_ogp.html
Facebook「いいね」設置時に絶対に行うべき1つの施策[Wordpress編]Add Star
http://d.hatena.ne.jp/hajimeataka/20110505/1304582395
WordPressでOpen Graph Protocolを実装したい
http://5509.me/log/wordpress-with-ogp