I'm developing a Asp.Net websi开发者_如何学运维te and I need to display the four most recent tweets from a group of users (around ten) that will be set in the admin area of the website. I know twitter has an API, but I don't know where to start. Any help would be really appreciated.
Check out the WCF REST Starter Kit doc. Here's a sample from the page:
HttpClient http = new HttpClient("http://twitter.com/statuses/");
http.TransportSettings.Credentials = new NetworkCredential("{username}", "{password}");
HttpResponseMessage resp = http.Get("friends_timeline.xml");
resp.EnsureStatusIsSuccessful();
ProcessStatuses(resp.Content.ReadAsStream());
Also download the kit from http://msdn.microsoft.com/en-us/netframework/cc950529.aspx.
There's a wrapper-type API called Yedda that's ridiculously easy to use. I got it working in just a few minutes, and it's pretty self-explanatory.
http://devblog.yedda.com/index.php/twitter-c-library/
Several .NET Libraries that interface with the Twitter API
http://dev.twitter.com/pages/libraries#csharp
精彩评论