title: send message to twitter
body: <p>I want to post a message in <code>twitter</code>.</p>
  
  <p>This is the code which I am using currently:</p>
  
  <pre><code>public void PostTweets(string userName, string password, string updateMessage)
  {
     using (WebClient wc = new WebClient())
     {
        wc.Credentials = new NetworkCredential(userName, password);
        ServicePointManager.Expect100Continue = false;
  
        byte[] updateMessageBytes = System.Text.Encoding.UTF8.GetBytes("status=" + updateMessage); //Use UTF8 to get it properly encoded if you use characters like ç ã etc...
  
        wc.UploadData("https://dev.twitter.com/docs/api/1/post/statuse/update",updateMessageBytes);
     }
  }
  </code></pre>
  
  <p>It's giving me a error like:</p>
  
  <pre><code>The remote server returned an error: (401) Unauthorized.
  </code></pre>