如何设置项目以使用TweetSharp

Stu*_*wig 2 wpf tweetsharp c#-4.0

我正在尝试跟随Pete Brown的介绍性WPF教程,该教程利用TweetSharp库与Twitter进行交互.

我从Codeplex(http://tweetsharp.codeplex.com/)下载了最新的TweetSharp二进制文件(以及其他一些包括ReleaseCandidate的文件).

无论我添加什么引用,无论我尝试使用哪种语句,我都无法为FluentTwitter类创建对TwitterService的引用.

我只是得到编译器错误 - "无法找到类型或命名空间".

现在我注意到Pete引用的TweetSharp.dll是518KB,但我的每个不同下载中包含的只有84kb.(我已经尝试了几次 - 我在这里得到完整的下载).

从Pete的文章到TweetSharp库的链接不再有效(http://code.google.com/p/tweetsharp/).

我在这里缺少什么基本元素或者我可能做错什么?

Jas*_*ler 5

自该文章发布以来,TweetSharp已移至CodePlex,这就是为什么Google Code的链接已经死亡.

您需要引用TweetSharp.dll,TweetSharp.Twitter.dll,(以及对于好的测量Hammock.dll和Newtonsoft.json.dll).

对于使用指令,如果您使用的是FluentTwitter方法:

using TweetSharp.Twitter.Fluent;
using TweetSharp.Twitter.Extensions;
using TweetSharp.Twitter.Model;
Run Code Online (Sandbox Code Playgroud)

如果您使用的是TwitterService方法:

using TweetSharp.Twitter.Model;
using TweetSharp.Twitter.Service;
Run Code Online (Sandbox Code Playgroud)

在CodePlex上还有一些其他的例子,包括一些启动应用程序,如果您下载源代码.