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

実行結果

Twitter REST API:ユーザー関連:show(指定したユーザー情報を取得) | 設置サンプル

設置サンプルのソース

<!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:ユーザー関連: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.3.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://twitter.com/statuses/show/2567482373.json?callback={callback}";
            $.getJSONP(url, function(json){
               var s="";
               s+="<li>json.user";
                  s+="<ul>";
                     s+="<li>json.user.profile_use_background_image = "+json.user.profile_use_background_image+"</li>";
                     s+="<li>json.user.following = "+json.user.following+"</li>";
                     s+="<li>json.user.friends_count = "+json.user.friends_count+"</li>";
                     s+="<li>json.user.profile_background_color = "+json.user.profile_background_color+"</li>";
                     s+="<li>json.user.description = "+json.user.description+"</li>";
                     s+="<li>json.user.screen_name = "+json.user.screen_name+"</li>";
                     s+="<li>json.user.statuses_count = "+json.user.statuses_count+"</li>";
                     s+="<li>json.user.profile_background_image_url = "+json.user.profile_background_image_url+"</li>";
                     s+="<li>json.user.id_str = "+json.user.id_str+"</li>";
                     s+="<li>json.user.truncated = "+json.user.truncated+"</li>";
                     s+="<li>json.user.profile_text_color = "+json.user.profile_text_color+"</li>";
                     s+="<li>json.user.location = "+json.user.location+"</li>";
                     s+="<li>json.user.listed_count = "+json.user.listed_count+"</li>";
                     s+="<li>json.user.profile_sidebar_fill_color = "+json.user.profile_sidebar_fill_color+"</li>";
                     s+="<li>json.user.profile_background_tile = "+json.user.profile_background_tile+"</li>";
                     s+="<li>json.user.url = "+json.user.url+"</li>";
                     s+="<li>json.user.lang = "+json.user.lang+"</li>";
                     s+="<li>json.user.followers_count = "+json.user.followers_count+"</li>";
                     s+="<li>json.user.notifications = "+json.user.notifications+"</li>";
                     s+="<li>json.user.time_zone = "+json.user.time_zone+"</li>";
                     s+="<li>json.user.created_at = "+json.user.created_at+"</li>";
                     s+="<li>json.user.profile_link_color = "+json.user.profile_link_color+"</li>";
                     s+="<li>json.user.name = "+json.user.name+"</li>";
                     s+="<li>json.user.profile_sidebar_border_color = "+json.user.profile_sidebar_border_color+"</li>";
                     s+="<li>json.user.id = "+json.user.id+"</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.utc_offset = "+json.user.utc_offset+"</li>";
                     s+="<li>json.user.favourites_count = "+json.user.favourites_count+"</li>";
                     s+="<li>json.user.profile_image_url = "+json.user.profile_image_url+"</li>";
                  s+="</ul>";
               s+="</li>";
               s+="<li>json.text = "+json.text+"</li>";
               s+="<li>json.coordinates = "+json.coordinates+"</li>";
               s+="<li>json.truncated = "+json.truncated+"</li>";
               s+="<li>json.id_str = "+json.id_str+"</li>";
               s+="<li>json.source = "+json.source+"</li>";
               s+="<li>json.geo = "+json.geo+"</li>";
               s+="<li>json.retweet_count = "+json.retweet_count+"</li>";
               s+="<li>json.in_reply_to_screen_name = "+json.in_reply_to_screen_name+"</li>";
               s+="<li>json.in_reply_to_status_id = "+json.in_reply_to_status_id+"</li>";
               s+="<li>json.in_reply_to_status_id_str = "+json.in_reply_to_status_id_str+"</li>";
               s+="<li>json.place = "+json.place+"</li>";
               s+="<li>json.created_at = "+json.created_at+"</li>";
               s+="<li>json.contributors = "+json.contributors+"</li>";
               s+="<li>json.retweeted = "+json.retweeted+"</li>";
               s+="<li>json.id = "+json.id+"</li>";
               s+="<li>json.in_reply_to_user_id_str = "+json.in_reply_to_user_id_str+"</li>";
               s+="<li>json.in_reply_to_user_id = "+json.in_reply_to_user_id+"</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:ユーザー関連:show(指定したユーザー情報を取得) | 設置サンプル</h1>
<!-- CODE -->
         <div id="recent"></div>
<!-- / CODE -->
      </div>
   </body>
</html>