Dear Reader,

I am posting data on to the twitter account by asp.net application
using twitter wrapper classes.

Whenever I post data with any URL twitter automatically executes/
invoke that url during posting process. I dont want to invoke posted
data content URL by twitter.

Any idea to avoid invoke URL ??


Code Snippet :
                  WebRequest request = default(WebRequest);
                  request.Credentials = new
NetworkCredential(username, password);
                   request.ContentType = "application/x-www-form-
urlencoded";
                    request.Method = "POST";

                    byte[] bytes = null;
                    bytes = Encoding.UTF8.GetBytes(data);
                    request.ContentLength = bytes.Length;
                    System.Net.ServicePointManager.Expect100Continue =
false;

                    using (Stream requestStream =
request.GetRequestStream())
                    {
                        requestStream.Write(bytes, 0, bytes.Length);
                        using (WebResponse response =
request.GetResponse())
                        {
                            using (StreamReader reader = new
StreamReader(response.GetResponseStream()))
                            {
                                return reader.ReadToEnd();
                            }
                        }
                    }

Rgds,
Shekhar





Reply via email to