I would like to update status on Twitter without using external libraries nor dll-s. I've found for example this solution:
http://www.dreamincode.net/code/snippet2556.htm
But it does not work and does not give any error.
Could you please tell me how to update status programmatically from c#?
When I catch error I get:
500 Internal Server Error
There is a nice WCF version of the Twitter API on CodePlex called Vertigo
Also, the WCF REST Starter Kit has some really nice demos, look at the Videos Section
Here is a sample of how this would be done using the Starter Kit
Look at the Yedda Twitter library to get some inspiration for the concepts and classes required, then write your own. Essentially you're just mimiking HTTP gets/posts and doing things with the XML that you send/receive.
Two thoughts on this Dream-in-Code snippet,
http://www.dreamincode.net/code/snippet2556.htm
First, I would put the Stream posting in a using block as in,
Second, I see that one of the method parameters is,
Since Twitter can only do a posting that is 140 characters or less, you should make sure that the incoming tweet string is likewise 140 characters or less. Ideally, you should deal with that before it hits this method.
It might not give any errors because the catch block is 'eating' the exception. Try getting rid of the try/catch (for testing purposes only) or do something in the catch to notify you of any errors.
Here is a really good post on how to consume twitter services using c# ... It goes into the new Microsoft.Http library you can download it here
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
Watch the video and type =)
http ://channel9.msdn.com/shows/Endpoint/endpointtv-Screencast-Consuming-REST-services-with-HttpClient/
Happy coding
There is a simple http post method that you can use. Take a look here:
http://apiwiki.twitter.com/REST-API-Documentation#TheEasiestWaytoPlayAroundwiththeTwitterAPI
Edit Twitter will be moving to an oAuth method too. http://blog.stevienova.com/2008/04/19/oauth-getting-started-with-oauth-in-c-net/