~ubuntu-branches/ubuntu/karmic/gtwitter/karmic

« back to all changes in this revision

Viewing changes to gtwitter/PostToTwitter.cs

  • Committer: Bazaar Package Importer
  • Author(s): Michael Janssen
  • Date: 2007-08-09 17:14:13 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20070809171413-28ppa0f2oxmr6qyt
Tags: upstream-1.0~beta
ImportĀ upstreamĀ versionĀ 1.0~beta

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
using System.Net;
4
4
using System.IO;
5
5
using System.Text;
 
6
using System.Web;
6
7
using System.Xml;
7
8
 
8
9
namespace gtwitter
18
19
                
19
20
                //posting to twitter
20
21
                public bool PostDataToTwitter(string TwitterPostUrl, string TwitterName, string TwitterPass, string post)
21
 
                {
 
22
                {               
 
23
                        if (MainWindow.directM)
 
24
                                post = "D " + MainWindow.screenName + " " + post;
 
25
                        
 
26
                        //Console.WriteLine(post);
 
27
                        post = HttpUtility.UrlEncode(post);
22
28
                        HttpWebRequest request = GeneratePostRequest(TwitterPostUrl, "POST", string.Format("status={0}", post), TwitterName, TwitterPass);
23
29
                        string returnString = string.Empty;                     
24
30
                        HttpWebResponse response = null;