Hot Cocoa 8: Twitter App II

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

3 Responses

  1. Paris Says:

    Bravo on your effort! Great stuff.

  2. mack1412 Says:

    I am enjoying this Kevin. Keep up the good work!

  3. Ivan Karpan Says:

    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/

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.