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.
