<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Display Your Twitter Feed using ASP.NET</title>
	<atom:link href="http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/</link>
	<description>Web Development Tools, Ideas, Techniques and Resources</description>
	<lastBuildDate>Thu, 01 Dec 2011 17:36:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ghous</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-391</link>
		<dc:creator>ghous</dc:creator>
		<pubDate>Thu, 21 Jul 2011 15:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-391</guid>
		<description>this does not work with the latest realse , whats the alternative?</description>
		<content:encoded><![CDATA[<p>this does not work with the latest realse , whats the alternative?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DNN Developers</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-362</link>
		<dc:creator>DNN Developers</dc:creator>
		<pubDate>Wed, 09 Mar 2011 03:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-362</guid>
		<description>I am using a JS Widget for Twitter update.. I think that working good.


    new TWTR.Widget({
        version: 2,
        type: &#039;profile&#039;,
        rpp: 5,
        interval: 6000,
        width: &#039;auto&#039;,
        height: 300,
        theme: {
            shell: {
                background: &#039;#454d4a&#039;,
                color: &#039;#f0f5f0&#039;
            },
            tweets: {
                background: &#039;#ffffff&#039;,
                color: &#039;#1218e0&#039;,
                links: &#039;#4aed05&#039;
            }
        },
        features: {
            scrollbar: true,
            loop: false,
            live: true,
            hashtags: true,
            timestamp: true,
            avatars: true,
            behavior: &#039;all&#039;
        }
    }).render().setUser(&#039;TugberkUgurlu&#039;).start();
</description>
		<content:encoded><![CDATA[<p>I am using a JS Widget for Twitter update.. I think that working good.</p>
<p>    new TWTR.Widget({<br />
        version: 2,<br />
        type: &#8216;profile&#8217;,<br />
        rpp: 5,<br />
        interval: 6000,<br />
        width: &#8216;auto&#8217;,<br />
        height: 300,<br />
        theme: {<br />
            shell: {<br />
                background: &#8216;#454d4a&#8217;,<br />
                color: &#8216;#f0f5f0&#8242;<br />
            },<br />
            tweets: {<br />
                background: &#8216;#ffffff&#8217;,<br />
                color: &#8216;#1218e0&#8242;,<br />
                links: &#8216;#4aed05&#8242;<br />
            }<br />
        },<br />
        features: {<br />
            scrollbar: true,<br />
            loop: false,<br />
            live: true,<br />
            hashtags: true,<br />
            timestamp: true,<br />
            avatars: true,<br />
            behavior: &#8216;all&#8217;<br />
        }<br />
    }).render().setUser(&#8216;TugberkUgurlu&#8217;).start();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitter Feeds - DesignersTalk</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-341</link>
		<dc:creator>Twitter Feeds - DesignersTalk</dc:creator>
		<pubDate>Fri, 29 Oct 2010 09:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-341</guid>
		<description>[...] first result in google: How to Display Your Twitter Feed using ASP.NET &#124; Adventures In Development [...]</description>
		<content:encoded><![CDATA[<p>[...] first result in google: How to Display Your Twitter Feed using ASP.NET | Adventures In Development [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-337</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Sat, 25 Sep 2010 19:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-337</guid>
		<description>I got it working with this:

UserTimelineOptions options = new UserTimelineOptions();
            options.ScreenName=&quot;YOURUSERNAME&quot;;


            TwitterStatusCollection recentTweets = TwitterTimeline.UserTimeline(options);</description>
		<content:encoded><![CDATA[<p>I got it working with this:</p>
<p>UserTimelineOptions options = new UserTimelineOptions();<br />
            options.ScreenName=&#8221;YOURUSERNAME&#8221;;</p>
<p>            TwitterStatusCollection recentTweets = TwitterTimeline.UserTimeline(options);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-336</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Sat, 25 Sep 2010 19:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-336</guid>
		<description>I downloaded the binaries from http://www.twitterizer.net/downloads/ but not sure which DLL to referece. I went for Twtiterizer2 but your code does not compile. I guess you had an older version?</description>
		<content:encoded><![CDATA[<p>I downloaded the binaries from <a href="http://www.twitterizer.net/downloads/" rel="nofollow">http://www.twitterizer.net/downloads/</a> but not sure which DLL to referece. I went for Twtiterizer2 but your code does not compile. I guess you had an older version?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wsf wsds</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-329</link>
		<dc:creator>wsf wsds</dc:creator>
		<pubDate>Fri, 10 Sep 2010 11:49:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-329</guid>
		<description>UPDATE 3/23/2010 - Ricky from Twitterizer commented below noting that basic authentication will soon go away via Twitter and OAUTH will be required. Note that the code below will only work for a few months. We will post an updated code-example soon.

As I write this article, It’s about 75 degrees and Sunny outside. When I should be going out on a bike ride, instead I’ve opted to play with Twitterizer (an ASP.NET Twitter Library). Twitterizer is an ASP.NET library that lets you interact with the Twitter API using easy to use objects and methods. It will work with any of the .NET variants (C#, VB, J#, Windows Forms, ASP.NET, WPF, etc). I added the functionality into the 360 Web Content Management System and I thought I’d share with you how I did it.

Here’s how to retrieve twitter feeds in ASP.NET

(1) Get a copy of the Twitterizer Library 

First, you’ll need to get a copy of the Twitterizer Library from Google’s Codebase. The download is pretty small and contains only the application library (DLL) you need. Create a new website in ASP.NET and extract the twitterizer library to the /bin/ folder so that you can use it.  Once you have it placed in your /bin/ folder, add a “using” reference to the library in the header of your page.

using Twitterizer.Framework;

(2) Create a “Twitter” object and Retrieve Your Status Updates.

The library contains a few different objects that you can create. A “Twitter” object is the most generic object that you can create. Creating an instance of this object using your username and password gives you all the functionality you would normally have in Twitter, but instead of using the Twitter web interface, you’re using C# or Visual Basic. First, we’ll need to instantiate the object, and then get a collection of status updates from your account.

Twitter thisUser = new Twitter(“UserNameHere”, “PasswordHere”);
TwitterStatusCollection thisCollection = thisUser.Status.UserTimeline();

(3) Loop Through Your Status Updates and Generate Some HTML

The “TwitterStatusCollection” object type is a list of “TwitterStatus” objects, so you can use a foreach loop and go through your most recent status updates. You’ll notice in the code below that I also do some basic work with the time of the status update to generate a hyperlink to the page of the status, similar to what Twitter does.

string TwitterCode = “”;
foreach (TwitterStatus thisStatus in thisCollection)
{

TimeSpan thisSpan = new TimeSpan();
thisSpan = DateTime.Now.Subtract(thisStatus.Created);

string TimeBetween = “”;
if (thisSpan.Days &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” days ago”; }
else if (thisSpan.Hours &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” hours ago”;}
else if (thisSpan.Minutes &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” minutes ago”;}
else if (thisSpan.Seconds &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” seconds ago”;}

TwitterCode += “” + thisStatus.Text + ” &lt;a href=&quot;//twitter.com/”&quot; rel=&quot;nofollow&quot;&gt;” + TimeBetween + “&lt;/a&gt;”;
}
(4) Display Your Tweets 

You now have a string with your most recent twitter status updates that you can display on the page using a simple Response.Write() or you can display it in a label. You can see a variation of this code running on the “Twitter” page for the 360 Web Content Management System.

You can also download a copy of my sample code.</description>
		<content:encoded><![CDATA[<p>UPDATE 3/23/2010 &#8211; Ricky from Twitterizer commented below noting that basic authentication will soon go away via Twitter and OAUTH will be required. Note that the code below will only work for a few months. We will post an updated code-example soon.</p>
<p>As I write this article, It’s about 75 degrees and Sunny outside. When I should be going out on a bike ride, instead I’ve opted to play with Twitterizer (an ASP.NET Twitter Library). Twitterizer is an ASP.NET library that lets you interact with the Twitter API using easy to use objects and methods. It will work with any of the .NET variants (C#, VB, J#, Windows Forms, ASP.NET, WPF, etc). I added the functionality into the 360 Web Content Management System and I thought I’d share with you how I did it.</p>
<p>Here’s how to retrieve twitter feeds in ASP.NET</p>
<p>(1) Get a copy of the Twitterizer Library </p>
<p>First, you’ll need to get a copy of the Twitterizer Library from Google’s Codebase. The download is pretty small and contains only the application library (DLL) you need. Create a new website in ASP.NET and extract the twitterizer library to the /bin/ folder so that you can use it.  Once you have it placed in your /bin/ folder, add a “using” reference to the library in the header of your page.</p>
<p>using Twitterizer.Framework;</p>
<p>(2) Create a “Twitter” object and Retrieve Your Status Updates.</p>
<p>The library contains a few different objects that you can create. A “Twitter” object is the most generic object that you can create. Creating an instance of this object using your username and password gives you all the functionality you would normally have in Twitter, but instead of using the Twitter web interface, you’re using C# or Visual Basic. First, we’ll need to instantiate the object, and then get a collection of status updates from your account.</p>
<p>Twitter thisUser = new Twitter(“UserNameHere”, “PasswordHere”);<br />
TwitterStatusCollection thisCollection = thisUser.Status.UserTimeline();</p>
<p>(3) Loop Through Your Status Updates and Generate Some HTML</p>
<p>The “TwitterStatusCollection” object type is a list of “TwitterStatus” objects, so you can use a foreach loop and go through your most recent status updates. You’ll notice in the code below that I also do some basic work with the time of the status update to generate a hyperlink to the page of the status, similar to what Twitter does.</p>
<p>string TwitterCode = “”;<br />
foreach (TwitterStatus thisStatus in thisCollection)<br />
{</p>
<p>TimeSpan thisSpan = new TimeSpan();<br />
thisSpan = DateTime.Now.Subtract(thisStatus.Created);</p>
<p>string TimeBetween = “”;<br />
if (thisSpan.Days &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” days ago”; }<br />
else if (thisSpan.Hours &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” hours ago”;}<br />
else if (thisSpan.Minutes &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” minutes ago”;}<br />
else if (thisSpan.Seconds &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” seconds ago”;}</p>
<p>TwitterCode += “” + thisStatus.Text + ” <a href="//twitter.com/”" rel="nofollow">” + TimeBetween + “</a>”;<br />
}<br />
(4) Display Your Tweets </p>
<p>You now have a string with your most recent twitter status updates that you can display on the page using a simple Response.Write() or you can display it in a label. You can see a variation of this code running on the “Twitter” page for the 360 Web Content Management System.</p>
<p>You can also download a copy of my sample code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Paulson</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-213</link>
		<dc:creator>Matthew Paulson</dc:creator>
		<pubDate>Wed, 24 Mar 2010 16:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-213</guid>
		<description>Hi Brian,

You will want to use a for loop instead of a foreach loop, which will look something like this:

int TweetLimit = thisCollection.Count;
if(TweetLimit &gt; 4) {TweetLimit = 4; }

string TwitterCode = “”;
for(int x=0; x&lt;TweetLimit; x++)
{

TimeSpan thisSpan = new TimeSpan();
thisSpan = DateTime.Now.Subtract(thisCollection[x].Created);

string TimeBetween = “”;
if (thisSpan.Days &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” days ago”; }
else if (thisSpan.Hours &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” hours ago”;}
else if (thisSpan.Minutes &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” minutes ago”;}
else if (thisSpan.Seconds &gt; 0) { TimeBetween = thisSpan.Days.ToString() + ” seconds ago”;}

TwitterCode += ” + thisCollection[x].Text + ” &lt;a href=&quot;//twitter.com/”&quot; rel=&quot;nofollow&quot;&gt;” + TimeBetween + “&lt;/a&gt;”;
}

The syntax may not be entirely correct (I wrote it in notepad, not VS), but it will give you an idea of what to do. Also please take note of Ricky&#039;s comment below that the API is getting re-written. Feel free to email me if you have any more questions.</description>
		<content:encoded><![CDATA[<p>Hi Brian,</p>
<p>You will want to use a for loop instead of a foreach loop, which will look something like this:</p>
<p>int TweetLimit = thisCollection.Count;<br />
if(TweetLimit &gt; 4) {TweetLimit = 4; }</p>
<p>string TwitterCode = “”;<br />
for(int x=0; x<tweetlimit ; x++)<br />
{</p>
<p>TimeSpan thisSpan = new TimeSpan();<br />
thisSpan = DateTime.Now.Subtract(thisCollection[x].Created);</p>
<p>string TimeBetween = “”;<br />
if (thisSpan.Days > 0) { TimeBetween = thisSpan.Days.ToString() + ” days ago”; }<br />
else if (thisSpan.Hours > 0) { TimeBetween = thisSpan.Days.ToString() + ” hours ago”;}<br />
else if (thisSpan.Minutes > 0) { TimeBetween = thisSpan.Days.ToString() + ” minutes ago”;}<br />
else if (thisSpan.Seconds > 0) { TimeBetween = thisSpan.Days.ToString() + ” seconds ago”;}</p>
<p>TwitterCode += ” + thisCollection[x].Text + ” &lt;a href=&#8221;//twitter.com/”&#8221; rel=&#8221;nofollow&#8221;&gt;” + TimeBetween + “”;<br />
}</p>
<p>The syntax may not be entirely correct (I wrote it in notepad, not VS), but it will give you an idea of what to do. Also please take note of Ricky&#8217;s comment below that the API is getting re-written. Feel free to email me if you have any more questions.</tweetlimit></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-212</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Wed, 24 Mar 2010 13:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-212</guid>
		<description>Thanks for this, I found it a great help. I&#039;m having trouble with controlling the amount of Tweets that appear on screen. How can i limit this to only 3 or 4 of the latest. Also my times are only showing 0secs or 0 hours. Please excuse me as I&#039;m new to ASP.net</description>
		<content:encoded><![CDATA[<p>Thanks for this, I found it a great help. I&#8217;m having trouble with controlling the amount of Tweets that appear on screen. How can i limit this to only 3 or 4 of the latest. Also my times are only showing 0secs or 0 hours. Please excuse me as I&#8217;m new to ASP.net</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Paulson</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-206</link>
		<dc:creator>Matthew Paulson</dc:creator>
		<pubDate>Tue, 23 Mar 2010 15:47:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-206</guid>
		<description>Ricky - Thanks for the update about the API status change. I&#039;ll put a note on the post and write an updated example using the new authentication methods.</description>
		<content:encoded><![CDATA[<p>Ricky &#8211; Thanks for the update about the API status change. I&#8217;ll put a note on the post and write an updated example using the new authentication methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky</title>
		<link>http://www.adventuresindevelopment.com/2009/06/21/how-to-display-your-twitter-feed-using-aspnet/comment-page-1/#comment-205</link>
		<dc:creator>Ricky</dc:creator>
		<pubDate>Tue, 23 Mar 2010 14:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.adventuresindevelopment.com/?p=145#comment-205</guid>
		<description>Thanks for the great write up on my little project. :)

Twitterizer is undergoing a complete re-write, since BASIC authentication is going away in favor of OAuth. I&#039;m trying to let everyone know myself so that stale tutorials aren&#039;t left all over the place, since these kinds of samples will stop working in June.

If you have any questions about the new version, feel free to contact me directly (be sure to mention this post so I know how you found me). If you make a follow up tutorial, let me know so I can link to your site on our new tutorials page.</description>
		<content:encoded><![CDATA[<p>Thanks for the great write up on my little project. <img src='http://www.adventuresindevelopment.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Twitterizer is undergoing a complete re-write, since BASIC authentication is going away in favor of OAuth. I&#8217;m trying to let everyone know myself so that stale tutorials aren&#8217;t left all over the place, since these kinds of samples will stop working in June.</p>
<p>If you have any questions about the new version, feel free to contact me directly (be sure to mention this post so I know how you found me). If you make a follow up tutorial, let me know so I can link to your site on our new tutorials page.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
