08 January 2010 ~ Comments

TweetSharp Preview 22 – User Search, Mixed Auth photo posting, and Compact Edition

TweetSharp preview 22 has been posted, and contains a bunch of improvements.

First off, the User Search API is now supported:

var search = FluentTwitter.CreateRequest()
    .AuthenticateAs(TWITTER_USERNAME, TWITTER_PASSWORD)
    .Users().SearchFor("dumbledore");

var result = search.Request();
var users = result.AsUsers();

Next, if you typically use OAuth in your app, but want to post a photo using one of the supported photo posting services then you still need to use basic authentication to authenticate with the external service. Without dual authentication, the resulting post will not have your app’s source information and link and that’s no good. To that end, we now support using OAuth for the status update, while using Basic with the external service:

 var twitter = FluentTwitter.CreateRequest()
        .AuthenticateWith(OAUTH_CONSUMER_KEY,
                          OAUTH_CONSUMER_SECRET,
                          OAUTH_TOKEN,
                          OAUTH_TOKEN_SECRET) //sent to twitter
        .ExternallyAuthenticateAs( TWITTER_USERNAME, TWITTER_PASSWORD ) //sent to photo host
        .Photos().PostPhoto( "C:\AwesomePhoto.jpg", provider )
        .Statuses().Update( "Check out my awesome photo" );

Lastly, our previously “experimental only” Compact Framework library has been beefed up, regularly passes the same unit tests as the primary Windows library (give or take a couple that are excluded for compatibility reasons), and is tentatively ready-for-prime-time enough to include in this preview. If you’re looking to port your app to Windows Mobile or start a new Windows Mobile project, we hope you’ll give it a try and submit any feedback you might have.

If you’re looking for a kickstart, there’s a starter/sample Windows Mobile application checked into the trunk. Feel free to use it as the basis for your app or just as a source of sample code.

  • Is there a way to develop relationships with 3rd party API's so that only one oAuth is required and no credentials need to be collected or passed? Otherwise mashing up multiple Twitter apps seems very kludgy. Any good way to deal with this?
  • Darren
    Is this build broken? trying to use asp.net/vb.net and cant do anything with FluentTwitter.

    Keep on getting - 'FluentTwitter' is ambiguous in the namespace 'Dimebrain.TweetSharp.Fluent'.
  • You should only reference Dimebrain.TweetSharp.dll, not Dimebrain.TweetSharp.Compact.dll, if you're not doing mobile development. We'll make that more clear in the next preview by binning them in folders.
  • GrammarNazi
    WRT header image @ http://tweetsharp.com/wp-content/uploads/2009/0...

    There should be a comma after "short" :)

    "TweetSharp is short, sweet, and social."
  • proxdeveloper
    Thanks guys for this awesome library.
blog comments powered by Disqus