Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
175 views
in Technique[技术] by (71.8m points)

c# - 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).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...