Search code examples
c#twitter

Post "Hello World" to twitter from .NET application


My client would like me to use .NET to post to Twitter, and suggests that I use C#.

Q: How do I post "Hello World" to twitter using C#?

This post mentions a library called twitterizer. Isn't there a native way to do it without using a 3rd party library? (Maybe not since authentication is one of the requirements).


Solution

  • Just use this implemented wrapper for the Twitter API:

    https://github.com/danielcrenna/tweetsharp

        var twitter = FluentTwitter.CreateRequest()   
        .AuthenticateAs("USERNAME", "PASSWORD")   
        .Statuses().Update("Hello World!")   
        .AsJson();   
    
        var response = twitter.Request();  
    

    From: http://code-inside.de/blog-in/2009/04/23/howto-tweet-with-c/

    There is even a DotNetRocks interview with the developers.