PHP & JavaScript Room :: 設置サンプル

実行結果

Twitter REST API:リスト関連:lists/show(指定したリストの情報を取得)| 設置サンプル

リストID「43044556」の情報を取得します。このAPIは認証不要です。

設置サンプルのソース

<!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:リスト関連:lists/show(指定したリストの情報を取得) | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/jquery.jsonp.js"></script>
      <!-- JS -->
      <script type="text/javascript">
         $(function(){
            var url="http://api.twitter.com/1/lists/show.json?list_id=43044556&callback={callback}";
            $.getJSONP(url, function(json){
               var s="";
               s+="<li>json.mode = "+json.mode+"</li>";
               s+="<li>json.description = "+json.description+"</li>";
               s+="<li>json.member_count = "+json.member_count+"</li>";
               s+="<li>json.following = "+json.following+"</li>";
               s+="<li>json.subscriber_count = "+json.subscriber_count+"</li>";
               s+="<li>json.id_str = "+json.id_str+"</li>";
               s+="<li>json.slug = "+json.slug+"</li>";
               s+="<li>json.full_name = "+json.full_name+"</li>";
               s+="<li>json.name = "+json.name+"</li>";
               s+="<li>json.uri = "+json.uri+"</li>";
               s+="<li>json.id = "+json.id+"</li>";
               s+="<li>json.user";
                  s+="<ul>";
                     s+="<li>json.user.default_profile = "+json.user.default_profile+"</li>";
                     s+="<li>json.user.follow_request_sent = "+json.user.follow_request_sent+"</li>";
                     s+="<li>json.user.lang = "+json.user.lang+"</li>";
                     s+="<li>json.user.friends_count = "+json.user.friends_count+"</li>";
                     s+="<li>json.user.verified = "+json.user.verified+"</li>";
                     s+="<li>json.user.profile_link_color = "+json.user.profile_link_color+"</li>";
                     s+="<li>json.user.description = "+json.user.description+"</li>";
                     s+="<li>json.user.location = "+json.user.location+"</li>";
                     s+="<li>json.user.show_all_inline_media = "+json.user.show_all_inline_media+"</li>";
                     s+="<li>json.user.geo_enabled = "+json.user.geo_enabled+"</li>";
                     s+="<li>json.user.profile_sidebar_border_color = "+json.user.profile_sidebar_border_color+"</li>";
                     s+="<li>json.user.followers_count = "+json.user.followers_count+"</li>";
                     s+="<li>json.user.time_zone = "+json.user.time_zone+"</li>";
                     s+="<li>json.user.url = "+json.user.url+"</li>";
                     s+="<li>json.user.listed_count = "+json.user.listed_count+"</li>";
                     s+="<li>json.user.profile_use_background_image = "+json.user.profile_use_background_image+"</li>";
                     s+="<li>json.user.favourites_count = "+json.user.favourites_count+"</li>";
                     s+="<li>json.user.contributors_enabled = "+json.user.contributors_enabled+"</li>";
                     s+="<li>json.user.statuses_count = "+json.user.statuses_count+"</li>";
                     s+="<li>json.user.following = "+json.user.following+"</li>";
                     s+="<li>json.user.notifications = "+json.user.notifications+"</li>";
                     s+="<li>json.user.created_at = "+json.user.created_at+"</li>";
                     s+="<li>json.user.profile_background_color = "+json.user.profile_background_color+"</li>";
                     s+="<li>json.user.profile_background_image_url = "+json.user.profile_background_image_url+"</li>";
                     s+="<li>json.user.protected = "+json.user.protected+"</li>";
                     s+="<li>json.user.profile_image_url = "+json.user.profile_image_url+"</li>";
                     s+="<li>json.user.id_str = "+json.user.id_str+"</li>";
                     s+="<li>json.user.default_profile_image = "+json.user.default_profile_image+"</li>";
                     s+="<li>json.user.profile_text_color = "+json.user.profile_text_color+"</li>";
                     s+="<li>json.user.name = "+json.user.name+"</li>";
                     s+="<li>json.user.profile_sidebar_fill_color = "+json.user.profile_sidebar_fill_color+"</li>";
                     s+="<li>json.user.screen_name = "+json.user.screen_name+"</li>";
                     s+="<li>json.user.id = "+json.user.id+"</li>";
                     s+="<li>json.user.is_translator = "+json.user.is_translator+"</li>";
                     s+="<li>json.user.profile_background_tile = "+json.user.profile_background_tile+"</li>";
                     s+="<li>json.user.utc_offset = "+json.user.utc_offset+"</li>";
                  s+="</ul>";
               s+="</li>";
               $("#recent").html("<ul>"+s+"</ul>");
            });
         });
      </script>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap">
         <h1>Twitter REST API:リスト関連:lists/show(指定したリストの情報を取得)| 設置サンプル</h1>
         <p>リストID「43044556」の情報を取得します。このAPIは認証不要です。</p>
<!-- CODE -->
         <div id="recent"></div>
<!-- / CODE -->
      </div>
   </body>
</html>