This project has moved and is read-only. For the latest updates, please go here.

Error trying to TweetAsync

Feb 11, 2015 at 11:31 AM

I'm using LinqToTwitter successfully to pull statuses into a ASP.NET website, however I'm now trying to update statuses. Here is my code
 public async Task tweet(string status)

        var auth = new SingleUserAuthorizer
            CredentialStore = new SingleUserInMemoryCredentialStore
                ConsumerKey = consumerKey,
                ConsumerSecret = consumerSecret,
                AccessToken = accessToken,
                AccessTokenSecret = accessTokenSecret

        var ctx = new TwitterContext(auth);

        var tweet = await ctx.TweetAsync(status);

I get the following errors,

The type 'System.Threading.Tasks.Task1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Cannot await 'System.Threading.Tasks.Task

Both errors seem to happen on the var tweet = await ctx.TweetAsync(status) line

I must be missing something very obvious, but can't work out why it's not working.
Feb 24, 2015 at 3:33 AM

You should add a reference to the System.Threading.Tasks assembly.