Sale on 100% origional Designer Handbags
Welcome Guest Search | Active Topics | Members | Log In | Register

Sending direct message to tweeter in Asp.net C# App Options
adam
Posted: Friday, August 28, 2009 9:43:57 AM
Rank: Advanced Member
Groups: Member

Joined: 4/3/2008
Posts: 162
Points: 492
Location: London
Hi

which browsing for some thing i come across very useful peace of code. thought i share with you all

Code:

using System.Net;

         [OperationContract]
        public void DMSend(string username, string recipient, string tweet)
        {
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://twitter.com/direct_messages/new.xml?user=" + recipient + "&text=" + tweet);
            req.Method = "POST";
            req.Credentials = new NetworkCredential(username, password);
            req.ContentLength = 0;
            req.ContentType = "application/x-www-form-urlencoded";
            WebResponse response = req.GetResponse();
        }
Sponsor
Posted: Friday, August 28, 2009 9:43:57 AM
hightech
Posted: Friday, September 04, 2009 1:29:37 AM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2008
Posts: 119
Points: 260
Hey, its very useful for me....thanks for sharing.

Test Management System
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by: YAF.NET
Copyright © 2010 HaqTech.com All rights reserved.
This page was generated in 0.052 seconds.