Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hello you can make use of <code>https://api.twitter.com/1/statuses/user_timeline.json</code> to fetch user timeline and <code>http://api.twitter.com/1/users/show.json</code> to get information about the particular username. Here is a sample twitter widget which i developed hope it will help you.</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; body{background:#ccc;} .status{ color:#000; } h3,h4{ font-size: 14px; font-family: "Segoe UI", Tahoma, Verdana, Arial; text-decoration:none; } #txt { font-size: 11px; font-family: "Segoe UI", Tahoma, Verdana, Arial; } .status { min-height:60px; padding:6px; border-bottom:solid 1px #DEDEDE font-size: 11px; background:transparent; border:#eaeaea 2px; } .status a { color:#3cf; text-decoration:none font-size: 11px; } .status a:hover{ color:#3cf; text-decoration:underline } .twitter_image{ float:left; margin-right:14px; width:50px; height:50px; padding:3px; } .twitter_posted_at{ font-size:11px; color:#999 } #tweets{ margin:auto auto; overflow:scroll; background:#eaeaea; height:300px; width:300px; } &lt;/style&gt; &lt;div id="tweets"&gt; &lt;div id = "heading"&gt;&lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; var username = "Google"; var recentTweetsUrl = "https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=true&amp;screen_name="+username+"&amp;count=15&amp;callback=?" var followerCountUrl ="http://api.twitter.com/1/users/show.json?screen_name="+username+"&amp;callback=?"; $(document).ready(function() { $.ajax ({type: "GET",url: followerCountUrl,dataType:"jsonp",success: function(response) { fCount = response.followers_count; var headerData = "&lt;h3&gt;"+username+"&lt;/h3&gt;&lt;h4&gt;"+fCount+"Followers on Twitter&lt;/h4&gt;"; $(headerData).appendTo('#heading'); } }); $.ajax ({type: "GET",url: recentTweetsUrl,dataType:"jsonp",success: function(response) { var tdata=''; for(i=0;i&lt;response.length;i++) { data =response[i]; var id=data.id; var text=data.text; var created_time=data.created_at; var screen_name=data.user.screen_name; var image=data.user.profile_image_url; var source=data.source; tdata+="&lt;div class='status' id='"+id+"'&gt;&lt;img src="+image+" class='twitter_image'/&gt;&lt;a href='http://twitter.com/"+screen_name+"'&gt;"+screen_name+"&lt;/a&gt;&lt;div id='txt'&gt;"+text+"&lt;div class='twitter_posted_at'&gt;&lt;span class='timeago' title='"+created_time+"'&gt;&lt;/span&gt;&lt;i&gt;via "+source+" &lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;"; } $(tdata).appendTo('#tweets'); } }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload