Very Basic Concept

Feb 20, 2011 at 3:11 AM

I simply want to tweet status updates from my own application and account, I don't need to auhtorize anyone elses account. I just need to programmatically log into twitter and post a status update. The demos and documentation don't give any clear way to accomplish this. How can I do it.

Coordinator
Feb 20, 2011 at 5:05 AM

Hi,

Twitter originally supported basic authentication, which is very simple and straight forward, but that has been deprecated in favor of OAuth.  So, whatever API you use that requires authentication, such as status updates, will require authentication via OAuth.  Therefore, it also means that you need to authenticate your own account.  Today, the best way to do this is to authenticate with your own account, using LINQ to Twitter, save your credentials after the first time, and re-use those same credentials each time thereafter.  This scheme takes advantage of the fact that Twitter will always return the same authentication tokens for a user in a specific application.  To help with getting and saving OAuth credentials, look at the  Load() and ToString() methods on the Credentials object.  You can look at the samples in the downloadable source code for examples, which include desktop, ASP.NET Web Forms, ASP.NET MVC, and Silverlight OOB and Web.

The specific classes you use will depend on what type of application you're building.  I don't have any documentation on this yet, but looking a the source code and following a couple other discussions, such as http://linqtotwitter.codeplex.com/discussions/242622, might be helpful.

Joe