WordPress ソーシャルブックマーク系プラグイン その2
以前、Social Bookmarking JP が便利といったエントリを書いたけど、少し気になる点をみつけてしまった。
Twitter へのツイートボタンがあるのだが、通常だと短縮URLが使われず、URLに日本語が混じっていると非常に長いURLになってしまい、ツイッターの140文字制限を軽くオーバーしてしまう・・・。
たとえば、こんな感じ。
WordPress ソーシャルブックマーク系プラグイン : http://www.ninxit.com/blog/2010/05/05/wordpress-%E3%82%BD%E3%83%BC%E3%82%B7%E3%83%A3%E3%83%AB%E3%83%96%E3%83%83%E3%82%AF%E3%83%9E%E3%83%BC%E3%82%AF%E7%B3%BB%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3/
92文字ほどオーバーしてる。
これを対策するには、プラグインを弄るしかないのだけど、短縮URLサービスのAPIを叩くように変更するのは、かなりめんどくさい。
そこで、ブログ1年生でも設置できる超シンプルTwitter「つぶやきボタン」を使うことにしてみた。
このサービスを使えば、URLを自動で短縮してくれるっぽい。
変更内容は、以下のとおり。
social-bookmarking-jp.php
// Twitter
/*
'twitter' => array(
'label' => __('Twitter', 'social-bookmarking-jp'),
'entry' => array(
'link' => 'http://twitter.com/home?status=@URLENCODED_TITLE@%20@URLENCODED_LINK@',
'icon' => WP_PLUGIN_URL . '/social-bookmarking-jp/twitter.gif',
'width' => 16,
'height' => 16,
'alt' => __('Post to Twitter', 'social-bookmarking-jp')
),
// http://tweetbuzz.jp/static/imgcounter
'users' => array(
'link' => 'http://tweetbuzz.jp/redirect?url=@LINK@',
'icon' => 'http://tools.tweetbuzz.jp/imgcount?url=@LINK@',
'alt' => __('Tweets for this web page', 'social-bookmarking-jp')
)
),
*/
'twitter' => array(
'label' => __('Twitter', 'social-bookmarking-jp'),
'entry' => array(
'link' => 'http://2bu.in/j',
'icon' => 'http://2bu.in/tw',
'alt' => __('Post to Twitter', 'social-bookmarking-jp')
),
// http://tweetbuzz.jp/static/imgcounter
'users' => array(
'link' => 'http://2bu.in/d/http://www.ninxit.com/blog/',
'icon' => 'http://2bu.in/i/http://www.ninxit.com/blog/',
'alt' => __('Tweets for this web page', 'social-bookmarking-jp')
)
),
時間があれば、自分用にプラグインを作ってみたいところだけど、とりあえずしばらくこのままで行こうかな。