本文介绍了(简单)问题TweetSharp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我做的:
  1.创建一个C#项目从VS .NET 2005(控制台应用程序)
  2.连接库从tweetsharp.com
  3.我复制并粘贴想跑

Here is what I did :
1. I create a C# project from VS .NET 2005 (Console application)
2. Attached the library from tweetsharp.com
3. I copied and pasted and tried to run

在code

//setting up a request is unchanged
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs(user, password)
.Statuses().OnHomeTimeline().AsXml();

// In past releases 'response' used to be a string, now it's a TwitterResult object
var response = twitter.Request();

我不能让它运行。错误是:

I can't get it running. The error is :

'Dimebrain.TweetSharp.Fluent.IFluentTwitter' does not contain a definition for    'AuthenticateAs'... Data\Temporary Projects\ConsoleApplication1\Program.cs

我做错了任何想法?

Any ideas what I did wrong?

推荐答案

唯一的'使用'指令,你需要为code段应是:

The only 'using' directive you need for that code snippet should be:

using Dimebrain.TweetSharp.Fluent

您可能会最终也需要:

using Dimebrain.TweetSharp.Extensions;
using Dimebrain.TweetSharp.Model;

...所以你还不如加这些呢。

...so you might as well add those too.

我们确实计划崩溃了不少TweetSharp成一个单一命名空间在某些时候,但现在,应该让你的大部分你所需要的。

We do plan to collapse a lot of TweetSharp into a single namespace at some point, but for now that should get you most of what you need.

这篇关于(简单)问题TweetSharp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-20 01:50