↓マルチポストツールが流行っているようなので。
http://d.hatena.ne.jp/hygienic/20080906/1220689023
http://d.hatena.ne.jp/pbh/20080912/1221219963
まるちぽすとくんが完成しましたヽ(≧∀≦)ノ - SiroKuro Page
twitterとwassrとハイクにマルチポストするUbiquityコマンドを作りました。
ビルドインコマンドの"twitter"のソースパクり倒したので、所要時間15分ぐらい。やっぱりUbiquityは楽でいいですよ。
CmdUtils.CreateCommand({
name: "multipost",
icon: "http://assets3.twitter.com/images/favicon.ico",
takes: {status: noun_arb_text},
modifiers: {},
description: "twitter、HatenaHaiku、Wassrにマルチポスト",
preview: function(previewBlock, directObj) {
},
execute: function(directObj) {
var statusText = directObj.text;
if(statusText.length < 1) {
displayMessage("Twitter requires a status to be entered");
return;
}
var updateUrl = "https://twitter.com/statuses/update.json";
var updateParams = {
source: "ubiquity",
status: statusText
};
jQuery.ajax({
type: "POST",
url: updateUrl,
data: updateParams,
dataType: "json",
error: function() {
displayMessage("Twitter error - status not updated");
},
success: function() {
displayMessage("Twitter status updated");
}
});
var HUrl = "http://h.hatena.ne.jp/api/statuses/update.json";
var HParams = {
status: statusText,
source: "Ubiquity",
};
jQuery.ajax({
type: "POST",
url: HUrl,
data: HParams,
dataType: "json",
error: function() {
displayMessage("ハイクできません");
},
success: function() {
displayMessage("ハイクしました");
}
});
var WUrl = "http://api.wassr.jp/statuses/update.json";
var WParams = {
status: statusText,
source: "Ubiquity",
};
jQuery.ajax({
type: "POST",
url: WUrl,
data: WParams,
dataType: "json",
error: function() {
displayMessage("wassrできません");
},
success: function() {
displayMessage("wassrしました");
}
});
}
});