「この記事にTwitterでコメント」ボタンの記事URLをbit.lyで短縮するようにしたよ 2009年09月16日 23:30Twitter 以前このようなことをしたわけですが 「この記事にTwitterでコメント」ボタンをつけたよ – 頭ん中 このままだとブログ記事の URL をそのまま Twitter に渡すので こんな不格好なことになってしまいますね。 これだとすぐ Twitter の文字制限にかかってしまうので ここに出る元記事 URL を bit.ly で短縮するようにしました。 一応やったことを書いときます。 bit.ly の API は JSONP に対応してるから JavaScript でやればいいんだけど、 以前別のところで使ったのを使い回せて手っ取り早いので 今回は PHP で。 bit.ly の API Key を取得 bit.ly にユーザー登録して アカウント設