Hello Frenz,

I'm building an application in C#.Net 3.5. My Requirement is to post
message to twitter user, defined by me in text box, on button click
i'm passing my credentials and user name with message but i' m getting
following error:-

"the remote server returned an error 403 forbidden"

My Code is Below:-

           HttpWebRequest messageRequest = (HttpWebRequest)
WebRequest.Create("http://twitter.com/direct_messages/new.xml?user="; +
sendTo + "&text=" + message);
           messageRequest.Method = "POST";
           messageRequest.Credentials = new NetworkCredential
(username, password);
           messageRequest.ContentLength = 0;
           messageRequest.ContentType = "application/x-www-form-
           WebResponse response = messageRequest.GetResponse();
       catch(Exception ex)

any Help is Appreciated,

Reply via email to