たいしたことないけど、わすれないために。
Twitterに送るボタン作るときのJavaScript。
Twitterに送るなら
function sendTwitter() {
var title = "RT @yourname:" + document.title;
title = encodeURIComponent(title);
var url = location.href;
var tg_url = "http://twitter.com/home/?status=";
var twurl = tg_url + title + ' ' + url;
window.open(twurl);
}
ちなみに、Logpiに送るなら
function sendLogpi() {
var title = document.title;
title = encodeURIComponent(title);
var url = location.href;
var tg_url = "http://logpi.jp/home/?status=";
var logpiurl = tg_url + title + ' ' + url;
window.open(logpiurl);
}
でしょうか。

