Ca4nul @ facebook Ca4nul @ Twitter
Forum announcement: $$ Top Contributors Contest (March 2010) - Win Instant extra Cash $$
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: 142
Points: 432
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: 60
Points: 180
Hey, its very useful for me....thanks for sharing.

Microsoft: "You've got questions. We've got dancing paperclips
Test Management
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

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Ca4nul.Com
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.170 seconds.