views:

355

answers:

2

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

The 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?

A: 

You need to make sure you are referencing the right namespaces in your code - I think in this case Dimebrain.TweetSharp.Extensions.

There's a more thorough snippet here on the TweetSharp site.

Mark B
Not working. But I will keep trying though. Still the same error message.
henry
A: 

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

using Dimebrain.TweetSharp.Fluent

You'll probably also eventually need:

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

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

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.

Jason Diller
Object twitter = FluentTwitter.CreateRequest().AuthenticateAs("aa", "bb").Statuses().OnHomeTimeline().AsXml();The above is my code. Still gives me the same error message. Probably I am using 2005?
henry
Ahh, yes. You'll need to move to .Net framework 3.5 and VS 2008 to get it working since most of the methods are Extension methods and won't work otherwise.
Jason Diller
Thanks! I will get an express edition and read about the extensions.
henry