Search code examples
linq-to-twitter

Linq-to-Twitter: remote server returned an error: (410) Gone


I am trying to get Linq-to-Twitter to post a tweet. My code is based on Linq2Twitter WebFormsTweetsDemo from http://linqtotwitter.codeplex.com/wikipage?title=LINQ%20to%20Twitter%20Samples&referringTitle=Home

The app authenticates ok - I am running the sample on localhost using ASP.NET dev server.

But the following code to post a tweet fails:

var auth = new WebAuthorizer
{
      Credentials = new SessionStateCredentials()
};


var tweet = twitterCtx.UpdateStatus("Linqtowtwitter is working");

However the UpdateStatus call above returns "The remote server returned an error: (410) Gone". According to Fiddler no request is sent to twitter.


Solution

  • It sounds like you're using an older version of LINQ to Twitter. Twitter recently shut down Twitter API v1.0 and you should now use Twitter API v1.1. Here's the deprecation announcement:

    https://dev.twitter.com/blog/api-v1-is-retired

    You should upgrade to the latest version of LINQ to Twitter. Also, Twitter API v1.1 requires OAuth on all endpoints. When working with OAuth for the first time, it's common to encounter 401 Unauthorized errors. To help resolve these errors, I've written a FAQ: https://linqtotwitter.codeplex.com/wikipage?title=LINQ%20to%20Twitter%20FAQ&referringTitle=Documentation.

    Note: Twitter has been doing blackouts and announcements for about 9 months and I've been tweeting about it, @JoeMayo, since the first deprecation announcement.