<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Twitterizer</title>
	<atom:link href="http://www.twitterizer.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twitterizer.net</link>
	<description>We want to give your app Twitter.</description>
	<lastBuildDate>Mon, 05 Mar 2012 16:25:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sign in with Twitter in MVC3</title>
		<link>http://www.twitterizer.net/797/sign-on-with-twitter-in-mvc3/</link>
		<comments>http://www.twitterizer.net/797/sign-on-with-twitter-in-mvc3/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 19:11:51 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Code Sample]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=797</guid>
		<description><![CDATA[<p>For the last few days I have been working with MVC3 making a site that relies upon Twitter as the basis for user accounts, so I implemented <a href="https://dev.twitter.com/docs/auth/implementing-sign-twitter">Sign in with Twitter</a>. It turned out to be incredibly easy.</p> <p>First of all, you&#8217;ll need a controller to handle your sign on button and the OAuth [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few days I have been working with MVC3 making a site that relies upon Twitter as the basis for user accounts, so I implemented <a href="https://dev.twitter.com/docs/auth/implementing-sign-twitter">Sign in with Twitter</a>. It turned out to be incredibly easy.</p>
<p>First of all, you&#8217;ll need a controller to handle your sign on button and the OAuth callback. I named mine /Controllers/AccountController.cs. Only one method is required, it will handle the /Account/Logon/ route.</p>
<p>The first time the user hits the controller (they aren&#8217;t logged in) the OAuth arguments will be null, but there will be a ReturnUrl. The app reaches out to Twitter and gets a request token, then redirects the user to the authentication url. Once they have authenticated (and authorized your application) at Twitter, they will be sent back to the same /Account/Logon/ address, but this time with the OAuth arguments. The controller will then go to Twitter and get an access token. My application maintains user accounts, so I lookup the user account and create it if it doesn&#8217;t exist. I&#8217;m then using the built in FormsAuthentication class to set their authentication cookie. From then on, ASP.NET recognizes them as an authenticated user and all the built in goodies just work.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// GET: Account/Logon/</span>
<span style="color: #0600FF; font-weight: bold;">public</span> ActionResult Logon<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> oauth_token, <span style="color: #6666cc; font-weight: bold;">string</span> oauth_verifier, <span style="color: #6666cc; font-weight: bold;">string</span> ReturnUrl<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #008000;">&#40;</span>oauth_token<span style="color: #008000;">&#41;</span> <span style="color: #008000;">||</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #008000;">&#40;</span>oauth_verifier<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        UriBuilder builder <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> UriBuilder<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Request</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Url</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        builder<span style="color: #008000;">.</span><span style="color: #0000FF;">Query</span> <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Concat</span><span style="color: #008000;">&#40;</span>
            builder<span style="color: #008000;">.</span><span style="color: #0000FF;">Query</span>,
            <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #008000;">&#40;</span>builder<span style="color: #008000;">.</span><span style="color: #0000FF;">Query</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">?</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span> <span style="color: #008000;">:</span> <span style="color: #666666;">&quot;&amp;&quot;</span>,
            <span style="color: #666666;">&quot;ReturnUrl=&quot;</span>,
            ReturnUrl<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #6666cc; font-weight: bold;">string</span> token <span style="color: #008000;">=</span> OAuthUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">GetRequestToken</span><span style="color: #008000;">&#40;</span>
            ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;TwitterConsumerKey&quot;</span><span style="color: #008000;">&#93;</span>,
            ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;TwitterConsumerSecret&quot;</span><span style="color: #008000;">&#93;</span>,
            builder<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Token</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">return</span> Redirect<span style="color: #008000;">&#40;</span>OAuthUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">BuildAuthorizationUri</span><span style="color: #008000;">&#40;</span>token, <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    var tokens <span style="color: #008000;">=</span> OAuthUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">GetAccessToken</span><span style="color: #008000;">&#40;</span>
        ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;TwitterConsumerKey&quot;</span><span style="color: #008000;">&#93;</span>,
        ConfigurationManager<span style="color: #008000;">.</span><span style="color: #0000FF;">AppSettings</span><span style="color: #008000;">&#91;</span><span style="color: #666666;">&quot;TwitterConsumerSecret&quot;</span><span style="color: #008000;">&#93;</span>,
        oauth_token,
        oauth_verifier<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008000;">&#40;</span>TwitterizerDbContext db <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> TwitterizerDbContext<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        var user <span style="color: #008000;">=</span> db<span style="color: #008000;">.</span><span style="color: #0000FF;">Users</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Find</span><span style="color: #008000;">&#40;</span>tokens<span style="color: #008000;">.</span><span style="color: #0000FF;">UserId</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>user <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            user <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> User<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                TwitterUserId <span style="color: #008000;">=</span> tokens<span style="color: #008000;">.</span><span style="color: #0000FF;">UserId</span>,
                ScreenName <span style="color: #008000;">=</span> tokens<span style="color: #008000;">.</span><span style="color: #0000FF;">ScreenName</span>,
                TwitterAccessKey <span style="color: #008000;">=</span> tokens<span style="color: #008000;">.</span><span style="color: #0000FF;">Token</span>,
                TwitterAccessSecret <span style="color: #008000;">=</span> tokens<span style="color: #008000;">.</span><span style="color: #0000FF;">TokenSecret</span>
            <span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span>
&nbsp;
            db<span style="color: #008000;">.</span><span style="color: #0000FF;">Users</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>user<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            db<span style="color: #008000;">.</span><span style="color: #0000FF;">SaveChanges</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        FormsAuthentication<span style="color: #008000;">.</span><span style="color: #0000FF;">SetAuthCookie</span><span style="color: #008000;">&#40;</span>user<span style="color: #008000;">.</span><span style="color: #0000FF;">ScreenName</span>, <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #008000;">&#40;</span>ReturnUrl<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> Redirect<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;/&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">else</span>
        <span style="color: #0600FF; font-weight: bold;">return</span> Redirect<span style="color: #008000;">&#40;</span>ReturnUrl<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>For the UI, I used a partial view, very similar to the view that Visual Studio creates as part of the project template. I named this file /Views/Shared/_LogOnPartial.cshtml.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">@using Twitterizer.PublicWeb
&nbsp;
&lt;div class=&quot;logon-form&quot;&gt;
@if (User.Identity.IsAuthenticated)
{
    &lt;strong&gt;
        Logged in as @User.Identity.Name
        |
        @Html.ActionLink(&quot;Edit&quot;, &quot;Edit&quot;, &quot;Account&quot;)
        |
        @Html.ActionLink(&quot;Log out&quot;, &quot;Logout&quot;, &quot;Account&quot;)
    &lt;/strong&gt;
}
else
{
    @Html.ActionImage(&quot;Logon&quot;, &quot;Account&quot;, null, &quot;~/Content/images/sign-in-with-twitter-l.png&quot;, &quot;Sign in with twitter&quot;)
}
&lt;/div&gt;</pre></td></tr></table></div>

<p>I can then place the partial view on any other view with a simple command:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">@Html.Partial(&quot;_LogOnPartial&quot;)</pre></td></tr></table></div>

<p>One of the huge benefits of this is that the user will be automatically logged into the site the moment they try to access a protected resource, provided that they are logged into Twitter and have already authorized my application. The round trip to/from Twitter is seamless and the user may not even notice that it happened.</p>
<p><strong>Update: </strong> I forgot to mention 2 things: the image I&#8217;m using for the sign on button can be <a href="https://dev.twitter.com/docs/sign-twitter-resources" title="Sign in with Twitter Resources">downloaded here</a> and I have a special ActionImage extension method you&#8217;ll need to use my example. Just place this method in a static class in your project:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> MvcHtmlString ActionImage<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span> HtmlHelper html, <span style="color: #6666cc; font-weight: bold;">string</span> action, <span style="color: #6666cc; font-weight: bold;">string</span> controller, <span style="color: #6666cc; font-weight: bold;">object</span> routeValues, <span style="color: #6666cc; font-weight: bold;">string</span> imagePath, <span style="color: #6666cc; font-weight: bold;">string</span> alt<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var url <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> UrlHelper<span style="color: #008000;">&#40;</span>html<span style="color: #008000;">.</span><span style="color: #0000FF;">ViewContext</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RequestContext</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// build the &lt;img&gt; tag</span>
    var imgBuilder <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> TagBuilder<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;img&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    imgBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">MergeAttribute</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;src&quot;</span>, url<span style="color: #008000;">.</span><span style="color: #0000FF;">Content</span><span style="color: #008000;">&#40;</span>imagePath<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    imgBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">MergeAttribute</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;alt&quot;</span>, alt<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> imgHtml <span style="color: #008000;">=</span> imgBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span>TagRenderMode<span style="color: #008000;">.</span><span style="color: #0000FF;">SelfClosing</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// build the &lt;a&gt; tag</span>
    var anchorBuilder <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> TagBuilder<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;a&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    anchorBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">MergeAttribute</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;href&quot;</span>, url<span style="color: #008000;">.</span><span style="color: #0000FF;">Action</span><span style="color: #008000;">&#40;</span>action, controller, routeValues<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    anchorBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">InnerHtml</span> <span style="color: #008000;">=</span> imgHtml<span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// include the &lt;img&gt; tag inside</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> anchorHtml <span style="color: #008000;">=</span> anchorBuilder<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span>TagRenderMode<span style="color: #008000;">.</span><span style="color: #0000FF;">Normal</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">return</span> MvcHtmlString<span style="color: #008000;">.</span><span style="color: #0000FF;">Create</span><span style="color: #008000;">&#40;</span>anchorHtml<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/797/sign-on-with-twitter-in-mvc3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Twitterizer 2.4</title>
		<link>http://www.twitterizer.net/782/twitterizer-2-4/</link>
		<comments>http://www.twitterizer.net/782/twitterizer-2-4/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 17:04:17 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=782</guid>
		<description><![CDATA[<p>Version 2.4 has been posted as an official release.</p> <p>Here are the particulars:</p> This version is built for .NET 4.0. Removed NextPage() and PreviousPage() methods &#8212; users must manage page numbers and cursors manually Lots of bug fixes Add support for GET users/profile_image/:screen_name Add support for GET blocks/blocking/ids Add support for GET blocks/blocking Add support [...]]]></description>
			<content:encoded><![CDATA[<p>Version 2.4 has been posted as an official release.</p>
<p>Here are the particulars:</p>
<ul>
<li>This version is built for .NET 4.0.</li>
<li>Removed NextPage() and PreviousPage() methods &#8212; users must manage page numbers and cursors manually</li>
<li>Lots of bug fixes</li>
<li>Add support for GET users/profile_image/:screen_name</li>
<li>Add support for GET blocks/blocking/ids</li>
<li>Add support for GET blocks/blocking</li>
<li>Add support for GET friendships/incoming</li>
<li>Add support for GET friendships/outgoing</li>
<li>Add support for GET trends/:woeid</li>
<li>Add support for POST notifications/follow</li>
<li>Add support for POST notifications/leave</li>
<li>ListFavorites has a &#8220;count&#8221; parameter</li>
<li>Add support for POST account/update_profile</li>
<li>Add support for DELETE :user/:list_id/subscribers</li>
<li>Add support for POST lists/subscribers/create</li>
<li><strong>Full user streaming support!</strong></li>
<li><strong>Silverlight support!</strong>
</ul>
<p>I&#8217;ve moved to a single download that contains all of the binaries for the full library, client profile, silverlight, async, and OAuth-only projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/782/twitterizer-2-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Camp 2011</title>
		<link>http://www.twitterizer.net/750/code-camp-2011/</link>
		<comments>http://www.twitterizer.net/750/code-camp-2011/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 12:49:23 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Code Sample]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=750</guid>
		<description><![CDATA[<p>This weekend I gave a talk at the Tallahassee Code Camp introducing a small group of developers to Twitterizer. We covered basic usage, authorization with OAuth, and the streaming api. The group was well engaged and I had a lot of fun.</p> <p>You can find the demo applications I used here: <a href="/files/Twitterizer-TLHCodeCamp2011.zip" title="Demo code [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I gave a talk at the Tallahassee Code Camp introducing a small group of developers to Twitterizer. We covered basic usage, authorization with OAuth, and the streaming api. The group was well engaged and I had a lot of fun.</p>
<p>You can find the demo applications I used here: <a href="/files/Twitterizer-TLHCodeCamp2011.zip" title="Demo code zip file">Twitterizer-TLHCodeCamp2011.zip</a>.</p>
<p>In each of the four applications, you will need to provide your own consumer token (and sometimes access token, too).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/750/code-camp-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitterizer 2.3.3</title>
		<link>http://www.twitterizer.net/738/twitterizer-2-3-3/</link>
		<comments>http://www.twitterizer.net/738/twitterizer-2-3-3/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 17:33:39 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=738</guid>
		<description><![CDATA[<p>I&#8217;ve just posted Twitterizer 2.3.3. This update includes many bug fixes and support for additional end points. It is a quick attempt to merge 2.3.2 with the extensive changes we&#8217;ve made, but without requiring too many code changes for you. It also includes the latest in our streaming api library.</p> <p>The release is a little [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just posted Twitterizer 2.3.3. This update includes many bug fixes and support for additional end points. It is a quick attempt to merge 2.3.2 with the extensive changes we&#8217;ve made, but without requiring too many code changes for you. It also includes the latest in our streaming api library.</p>
<p>The release is a little different, in that it is a single zip file that includes all of the binaries. Hopefully this will cut out the confusion of having multiple zip files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/738/twitterizer-2-3-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Project</title>
		<link>http://www.twitterizer.net/726/state-of-the-project/</link>
		<comments>http://www.twitterizer.net/726/state-of-the-project/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 15:27:57 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Pillow Talk]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=726</guid>
		<description><![CDATA[<p>Hey everybody. Ricky here. Just wanted to take a few minutes to give all of you an update of things and address an issue that appears to have become more prevalent in the last few days weeks, along with a potential fix.</p> <p>For a while, reports of an issue have started to come in on [...]]]></description>
			<content:encoded><![CDATA[<p>Hey everybody. Ricky here. Just wanted to take a few minutes to give all of you an update of things and address an issue that appears to have become more prevalent in the last few <del datetime="2011-08-01T14:53:38+00:00">days</del> weeks, along with a potential fix.</p>
<p>For a while, reports of an issue have started to come in on the forums dealing with the search API, namely with deserializing results. The sad part is, this issue was fixed long ago (on 6/13/2011) by @GoldenTao. The real problem is that no release has been made in a very long time that includes this fix. </p>
<p>If you need this fix, I suggest you download the source of the last release, and <a href="http://pm.twitterizer.net/projects/twitterizer/repository/diff/trunk/Twitterizer2/Methods/Search/TwitterSearchResultCollection.cs?rev=449&#038;rev_to=398">apply this change</a>.</p>
<p>You may ask, &#8220;So, Ricky &#8230; why has it been so long since there has been a release? Does this mean that Twitterizer is dead?&#8221; Twitterizer is not dead. In fact, a LOT of changes have been made. @GoldenTao has put a lot of time working on the library. He&#8217;s added User Streaming support, fixed a lot of bugs, and made the entire library Silverlight compatible.</p>
<p>As to why there is no release, that&#8217;s mostly my fault. I can give reasons (I have a few legitimate ones) and excuses (I have many more of these), but it comes down to the fact that I have not been around. @GoldenTao has done great work, but I feel like there is a good deal of cleanup and restructuring that is needed before a release is put out. Needless to say, the next release will be a big one and I would like to make sure it is decent. I just need to find the time/mental capacity/motivation to do it.</p>
<p>Currently, this is what I feel the need to do:</p>
<ol>
<li>Restructure the project into multiple solutions. Make the base a SL build, with other solutions for .NET and .NET client profile that link in the base code files.</li>
<li>Ensure that Streaming support is complete. I know User streaming functions (I&#8217;ve been using it via Metrotwit beta for months), but I&#8217;m not sure about Site streaming.</li>
<li>Revisit the outstanding tasks/bugs.</li>
</ol>
<p>The last note I&#8217;d like to drop is about our Github repository. A while back I created a bash script (heresy, I know) to grab changes in our SVN repo and mirror them on Github. <strong>It&#8217;s broken.</strong> It&#8217;s been broken for a long time. I didn&#8217;t find out until recently (I don&#8217;t use Github personally). I spent a couple of hours trying to get the mirror script working again. It seems to tell me everything is OK, but it&#8217;s a damn liar and I hate it. I&#8217;m going to pull the link to it for the time being. If one of you would like to chip in and try to figure it out, I&#8217;d love it.</p>
<p>As always, feedback is welcome and appreciated.</p>
<p><strong>Update:</strong> I was curious, so I did a little checking. It&#8217;s been <em>9 months</em> since the last release. Since then, there have been 46 revisions. 367 changes by 4 developers (2 of them made a single change each). I&#8217;d say the project is still alive, wouldn&#8217;t you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/726/state-of-the-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paging through search results</title>
		<link>http://www.twitterizer.net/721/paging-through-search-results/</link>
		<comments>http://www.twitterizer.net/721/paging-through-search-results/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 15:14:44 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[code samples]]></category>
		<category><![CDATA[search api]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=721</guid>
		<description><![CDATA[<p>The following code block will search for the Twitterizer hashtag and return groups of 2 tweets per page. Each tweet will be displayed in the console. It will repeat the process for up to 5 pages of results.</p> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [...]]]></description>
			<content:encoded><![CDATA[<p>The following code block will search for the Twitterizer hashtag and return groups of 2 tweets per page. Each tweet will be displayed in the console. It will repeat the process for up to 5 pages of results.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #6666cc; font-weight: bold;">string</span> query <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;#Twitterizer&quot;</span><span style="color: #008000;">;</span>
<span style="color: #6666cc; font-weight: bold;">int</span> pageNumber <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span>
&nbsp;
SearchOptions options <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> SearchOptions<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    PageNumber <span style="color: #008000;">=</span> pageNumber,
    NumberPerPage <span style="color: #008000;">=</span> <span style="color: #FF0000;">2</span>
<span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span>
&nbsp;
TwitterResponse<span style="color: #008000;">&lt;</span>TwitterSearchResultCollection<span style="color: #008000;">&gt;</span> searchResult <span style="color: #008000;">=</span> TwitterSearch<span style="color: #008000;">.</span><span style="color: #0000FF;">Search</span><span style="color: #008000;">&#40;</span>query, options<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">while</span> <span style="color: #008000;">&#40;</span>searchResult<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span> <span style="color: #008000;">==</span> RequestResult<span style="color: #008000;">.</span><span style="color: #0000FF;">Success</span> <span style="color: #008000;">&amp;&amp;</span> pageNumber <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">5</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;==== PAGE {0} ====&quot;</span>, pageNumber<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>var tweet <span style="color: #0600FF; font-weight: bold;">in</span> searchResult<span style="color: #008000;">.</span><span style="color: #0000FF;">ResponseObject</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;[{0}] {1,-10}: {2}&quot;</span>, tweet<span style="color: #008000;">.</span><span style="color: #0000FF;">CreatedDate</span>, tweet<span style="color: #008000;">.</span><span style="color: #0000FF;">FromUserScreenName</span>, tweet<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    pageNumber<span style="color: #008000;">++;</span>
    options<span style="color: #008000;">.</span><span style="color: #0000FF;">PageNumber</span> <span style="color: #008000;">=</span> pageNumber<span style="color: #008000;">;</span>
    searchResult <span style="color: #008000;">=</span> TwitterSearch<span style="color: #008000;">.</span><span style="color: #0000FF;">Search</span><span style="color: #008000;">&#40;</span>query, options<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Press any key to exit.&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
Console<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadKey</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>This may seem a bit confusing, but the gist of it is that you simply need to pass a page number into the SearchOptions class to specify what page you would like to request.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/721/paging-through-search-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a User&#8217;s Followers</title>
		<link>http://www.twitterizer.net/646/get-a-users-followers/</link>
		<comments>http://www.twitterizer.net/646/get-a-users-followers/#comments</comments>
		<pubDate>Wed, 25 May 2011 14:04:34 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Code Sample]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=646</guid>
		<description><![CDATA[<p>Getting a list of a user&#8217;s followers used to be fairly straight forward, but Twitter has depreciated the more convenient endpoints, in favor of making multiple calls. This may seem like it&#8217;s a disservice to developers, but I can easily see how maintaining these endpoints was the cause of many headaches for Twitter, and the [...]]]></description>
			<content:encoded><![CDATA[<p>Getting a list of a user&#8217;s followers used to be fairly straight forward, but Twitter has depreciated the more convenient endpoints, in favor of making multiple calls.<span id="more-646"></span> This may seem like it&#8217;s a disservice to developers, but I can easily see how maintaining these endpoints was the cause of many headaches for Twitter, and the new way lends itself to better (or at least more efficient) coding for the mindful developers.</p>
<p style="text-align: left;">Instead of calling a single method to get a list of user objects in response, you&#8217;ll need to first request a list of the user ids. You&#8217;ll then use the TwitterUser.Lookup() method to request the details for the users you need (up to 100 at a time).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">TwitterResponse<span style="color: #008000;">&lt;</span>UserIdCollection<span style="color: #008000;">&gt;</span> followersResponse <span style="color: #008000;">=</span> TwitterFriendship<span style="color: #008000;">.</span><span style="color: #0000FF;">FollowersIds</span><span style="color: #008000;">&#40;</span>tokens<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>followersResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span> <span style="color: #008000;">!=</span> RequestResult<span style="color: #008000;">.</span><span style="color: #0000FF;">Success</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    ShowAndLogError<span style="color: #008000;">&#40;</span>followersResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span>, followersResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">ErrorMessage</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #0600FF; font-weight: bold;">else</span>
<span style="color: #008000;">&#123;</span>
    LookupUsersOptions lookupOptions <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> LookupUsersOptions<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// Loop through all of the follower user ids</span>
    <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> index <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> index <span style="color: #008000;">&lt;</span> followersResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">ResponseObject</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span><span style="color: #008000;">;</span> index<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">// We can only look up 100 users at a time</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>index <span style="color: #008000;">%</span> <span style="color: #FF0000;">100</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            TwitterResponse<span style="color: #008000;">&lt;</span>TwitterUserCollection<span style="color: #008000;">&gt;</span> userLookupResponse <span style="color: #008000;">=</span> TwitterUser<span style="color: #008000;">.</span><span style="color: #0000FF;">Lookup</span><span style="color: #008000;">&#40;</span>tokens, lookupOptions<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>userLookupResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span> <span style="color: #008000;">==</span> RequestResult<span style="color: #008000;">.</span><span style="color: #0000FF;">Success</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #008080; font-style: italic;">// Do something with the users</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">// Clear the lookup user ids</span>
            lookupOptions<span style="color: #008000;">.</span><span style="color: #0000FF;">UserIds</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        lookupOptions<span style="color: #008000;">.</span><span style="color: #0000FF;">UserIds</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>followersResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">ResponseObject</span><span style="color: #008000;">&#91;</span>index<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    TwitterResponse<span style="color: #008000;">&lt;</span>TwitterUserCollection<span style="color: #008000;">&gt;</span> userLookupResponse <span style="color: #008000;">=</span> TwitterUser<span style="color: #008000;">.</span><span style="color: #0000FF;">Lookup</span><span style="color: #008000;">&#40;</span>tokens, lookupOptions<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>userLookupResponse<span style="color: #008000;">.</span><span style="color: #0000FF;">Result</span> <span style="color: #008000;">==</span> RequestResult<span style="color: #008000;">.</span><span style="color: #0000FF;">Success</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">// Do something with the users</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p style="text-align: left;">You&#8217;ll probably notice that you could be making a LOT of calls to the database to lookup user data. This is exactly why I said it will lead developers to be more efficient: you&#8217;ll have to be. You should cook up a way to cache user details locally and only request updated details so-often on a user-by-user basis.</p>
<p><small>Disclaimer: I haven&#8217;t tested this code. It&#8217;s not written for you exact scenario. It&#8217;s an example and should be used only as a guide.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/646/get-a-users-followers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitterizer 2.3.2</title>
		<link>http://www.twitterizer.net/585/twitterizer-2-3-2/</link>
		<comments>http://www.twitterizer.net/585/twitterizer-2-3-2/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 15:45:10 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=585</guid>
		<description><![CDATA[<p>This morning Twitter dropped off the network and a Twitterizer bug appeared in its place. All requests to Twitter while the API is unavailable will result in unhandled exceptions being thrown.</p> <p>To address this issue, I&#8217;ve published version 2.3.2. This release will also address a few other bugs and includes support for a few more [...]]]></description>
			<content:encoded><![CDATA[<p>This morning Twitter dropped off the network and a Twitterizer bug appeared in its place. All requests to Twitter while the API is unavailable will result in unhandled exceptions being thrown.</p>
<p>To address this issue, I&#8217;ve published version 2.3.2. This release will also address a few other bugs and includes support for a few more API endpoints.</p>
<p>For the full list of changes, see the <a href="http://pm.twitterizer.net/versions/show/13">2.3.2 changelog</a>.</p>
<p>To download, update the package through nuget, or head over to our <a href="/Downloads/">downloads</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/585/twitterizer-2-3-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comment Lock Down</title>
		<link>http://www.twitterizer.net/579/comment-lock-down/</link>
		<comments>http://www.twitterizer.net/579/comment-lock-down/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 16:44:02 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=579</guid>
		<description><![CDATA[<p>Spammer suck and they&#8217;ve been sucking in our direction a lot recently. Until it settles down, I&#8217;ve disabled anonymous comments and issue submissions in the project management site and turned on topic and post moderation in the forums. I&#8217;d rather not force any one to register to either to ask questions or report issues, but [...]]]></description>
			<content:encoded><![CDATA[<p>Spammer suck and they&#8217;ve been sucking in our direction a lot recently. Until it settles down, I&#8217;ve disabled anonymous comments and issue submissions in the project management site and turned on topic and post moderation in the forums. I&#8217;d rather not force any one to register to either to ask questions or report issues, but I don&#8217;t have the time needed to weed out spam from the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/579/comment-lock-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Github Mirror</title>
		<link>http://www.twitterizer.net/573/github-mirror/</link>
		<comments>http://www.twitterizer.net/573/github-mirror/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 17:48:50 +0000</pubDate>
		<dc:creator>DigitallyBorn</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://www.twitterizer.net/?p=573</guid>
		<description><![CDATA[<p>I&#8217;ve created a mirror of our source code repository on GitHub. You can find it here: https://github.com/DigitallyBorn/Twitterizer</p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a mirror of our source code repository on GitHub. You can find it here: https://github.com/DigitallyBorn/Twitterizer</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twitterizer.net/573/github-mirror/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

