Twitter関連Twitter REST API:ヘルプ関連
- help/test〔Twitterが正常に動作しているか調べる(認証不要)〕
help/test
Twitterが正常に動作しているか調べる(認証不要)
2009/7/18
http://api.twitter.com/1/help/test.[xml|json]
Twitterが正常に動作している場合に、HTTPステータスコード 200 OKで、「ok」という文字列を返します。
取得サンプル(XML/JSON)
test.xml
<ok>true</ok>
test.json
ok
設置サンプル

設置サンプルサンプルを見る
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="ja" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="imagetoolbar" content="no" /> <title>Twitter REST API:ヘルプ関連:test(Twitterが正常に動作しているか調べる)| 設置サンプル</title> <link rel="stylesheet" type="text/css" href="/content/lib/global.css" /> <!-- JS --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="/content/lib/jquery/jquery.jsonp.js"></script> <script type="text/javascript"> $(function(){ var url="http://twitter.com/help/test.json?callback={callback}"; $.getJSONP(url, function(obj){ if(obj=="ok"){ $("#msg").text("Twitterはおちてません!"); }else{ $("#msg").text("Twitterはおちてます...orz"); } }); }); </script> </head> <body> <div id="wrap"> <!-- CODE --> <div id="msg" style="font-size:2em;"></div> <!-- / CODE --> </div> </body> </html>