.NET 的最佳 Twitter API 包装器/库是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/685015/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the best Twitter API wrapper/library for .NET?
提问by Boaz
I'm looking for a way to programatically generate a twitter feed for a .NET application. Any recommendations as to a good wrapper for the twitter api to ease the work?
我正在寻找一种以编程方式为 .NET 应用程序生成 Twitter 提要的方法。关于 twitter api 的一个好的包装器有什么建议可以简化工作吗?
Boaz
波阿斯
采纳答案by Scott Ivey
TweetSharplooks like it should be a decent option as well.
TweetSharp看起来也应该是一个不错的选择。
回答by Konstantin Tarkus
Microsoft.Owin.Security.Twitterfor authentication + custom C# code with HttpClientand Json.NET
Microsoft.Owin.Security.Twitter用于身份验证 + 带有HttpClient和Json.NET 的自定义 C# 代码
Something like:
就像是:
using (var client = new HttpClient())
{
client.BaseAddress = new Uri("https://api.twitter.com/1.1/");
client.DefaultRequestHeaders.Authorization = authValue;
var response = await client.GetAsync("search/tweets.json");
if (response.IsSuccessStatusCode)
{
var json = await response.Content.ReadAsStringAsync();
var tweets = JsonConvert.DeserializeObject<Tweets>(json);
}
}
Good read:
好读:
- Extending HttpClient with OAuth to Access Twitter(Feb, 2012)
- Calling a Web API From a .NET Client (C#)
- Official documentation: OAuth API, REST API, Streaming API
回答by Ric Tokyo
there is a linq to twitter project on codeplex:
Codeplex 上有一个 linq to twitter 项目:
http://www.codeplex.com/LinqToTwitter
http://www.codeplex.com/LinqToTwitter
Besides the Yedda library, you can read Pedro Santos' blogon his experience.
回答by Charles Graham
回答by splattne
You'll find an updated list of .NET Twitter libraries on Twitter's developer site:
您可以在 Twitter 的开发人员站点上找到 .NET Twitter 库的更新列表:
Twitter Developers: Twitter Libraries (for .NET)
Twitter 开发人员:Twitter 库(适用于 .NET)
- DotNetOpenAuth by Andrew Arnott – an OpenID, OAuth and InfoCard library
- Hammock by Daniel Crena – an HTTP API client supporting OAuth authentication.
- LINQ to Twitter by Joe Mayo – a LINQ provider for the Twitter API
- OAuth-Dot-Net by Chris – an OAuth library for clients and providers
- TweetSharp by Daniel Crenna & Jason Diller – a Twitter API library built with Hammock
- Twitterizer by DigitallyBorn – a Twitter API library (requires .NET > 3.5)
- TwitterVB by Duane Roelands – a VB.NET Twitter API library
- DotNetOpenAuth by Andrew Arnott – OpenID、OAuth 和 InfoCard 库
- Hammock by Daniel Crena – 一个支持 OAuth 身份验证的 HTTP API 客户端。
- LINQ to Twitter by Joe Mayo – Twitter API 的 LINQ 提供程序
- Chris 的 OAuth-Dot-Net – 客户端和提供商的 OAuth 库
- Daniel Crenna 和 Jason Diller 的 TweetSharp——一个用 Hammock 构建的 Twitter API 库
- DigitallyBorn 的 Twitterizer – 一个 Twitter API 库(需要 .NET > 3.5)
- Duane Roelands 的 TwitterVB——一个 VB.NET Twitter API 库
回答by Sean Sexton
All good answers, LinqToTwitter good. Also check out my post explaining the basics of using the Twitter API from C#/LINQ, including being aware of rate limits. (Which is important to understand).
所有好的答案,LinqToTwitter 很好。另请查看我的帖子,其中解释了从 C#/LINQ 使用 Twitter API 的基础知识,包括了解速率限制。(理解这一点很重要)。
http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/
http://stuff.seans.com/2009/04/04/a-simple-net-twitter-api-wrapper-using-linq/
Coming soon - a version of my code that automatically adjusts request speed to your rate limit. (Which is either 100/hr by default, or 20,000/hr if you or your site is "white listed").
即将推出 - 我的代码版本,可自动将请求速度调整为您的速率限制。(默认情况下为 100/小时,如果您或您的站点被“列入白名单”,则为 20,000/小时)。
回答by Chris Roberts
Twitterizer looks like it may be worth a look - it's even open source now... http://www.twitterizer.net/
Twitterizer 看起来值得一看——它现在甚至是开源的...... http://www.twitterizer.net/

