In this week’s episode: We take a look at creating a sheet, storing login information in the keychain and logging in to get the Twitter friends timeline.
Source code for this week’s episode: Click here to download.
Hot Cocoa Episode 8 – Portable / iPod: Download
Hot Cocoa Episode 8 – HD: Download
Questions or comments? Post them here, or e-mail them to: kevin [AT] lastedit.com Thanks!
Follow me on twitter: http://twitter.com/darkfox8963

December 14th, 2008 at 8:27 am
Bravo on your effort! Great stuff.
December 15th, 2008 at 5:38 pm
I am enjoying this Kevin. Keep up the good work!
February 3rd, 2009 at 8:09 am
Hey Kevin!
Thanks a lot for you podcast, it does a great job.
I want to add one thing to this episode.
When I tried to log into Twitter using my credentials I failed. Digging around the problem resulted in a fact that username and password when authenticating in the Twitter API should both be URL encoded. My login in Twitter is my email so I had problems with @ symbol.
Here’s what can be done here: before urlString declaration in getFriendsTimelineForUsername method we can do the following:
NSString *escapedUsername = (NSString *) CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)username, NULL, (CFStringRef)@”;/?:@&=+$,”, kCFStringEncodingUTF8);
NSString *escapedPassword = (NSString *) CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)password, NULL, (CFStringRef)@”;/?:@&=+$,”, kCFStringEncodingUTF8);
And use these variables instead of the ones we receive in the method. This looks ugly, but nasically the only way – here’s an explanation: http://www.tikirobot.net/wp/2007/01/27/url-encode-in-cocoa/