The Easiest Way to Save and Share Code Snippets on the web

tweetsharp - hello, world

csharp | by: Dimebrain

last edit: Mar, 26th 2009 | jump to bottom

using Dimebrain.TweetSharp.Fluent;
using Dimebrain.TweetSharp.Extensions;
using Dimebrain.TweetSharp.Model;
 
// Get the public timeline, caching the result for two minutes
var twitter = FluentTwitter.CreateRequest()
     .Configuration.CacheUntil(2.Minutes().FromNow())
     .Statuses().OnPublicTimeline().AsJson();
 
// Get response from Twitter
var response = twitter.Request();
 
// Convert response to data classes
var tweets = response.AsStatuses();
880 views