/// <summary> /// Twitts passed message to Twitter. /// </summary> /// <param name="message">Text message that needs to be twitted.</param> private void TwittResults(string message) { TwitterConnect twitter = new TwitterConnect(); if (!TwitterConnect.IsAuthorized) { twitter.OAuthToken = "352481636-LLfi8s5UgTG3wgNaTAAM4PWhebHMZYZJv1pk5XIB"; twitter.OAuthTokenSecret = "cXK4IQn1YrJ2JUG4WXq9AaO74f888Nm2OIWfjORo"; twitter.Authorize(Request.Url.AbsoluteUri.Split('?')[0]); } // Post results to Twitter. Only 140 characters can be posted to Twitter: string twitt = message.Substring(0, 140); twitter.Tweet(twitt); }
protected void btnTweet_Click(object sender, EventArgs e) { TwitterConnect twitter = new TwitterConnect(); twitter.Tweet(txtTweet.Text); }
/// <summary> /// Twitts passed message to Twitter. /// </summary> /// <param name="message">Text message that needs to be twitted.</param> private void TwittResults(string message) { TwitterConnect twitter = new TwitterConnect(); if (!TwitterConnect.IsAuthorized) { twitter.OAuthToken = "352481636-LLfi8s5UgTG3wgNaTAAM4PWhebHMZYZJv1pk5XIB"; twitter.OAuthTokenSecret = "cXK4IQn1YrJ2JUG4WXq9AaO74f888Nm2OIWfjORo"; twitter.Authorize(Request.Url.AbsoluteUri.Split('?')[0]); } // Post results to Twitter. Only 140 characters can be posted to Twitter: string twitt = message.Substring(0,140); twitter.Tweet(twitt); }