public bool SendTweet(string text) { Tweet t = new Tweet(text, _token); return(t.Publish()); }
private static void PublishTweet(string message, string url) { // 117 is a magical tweet length number if (message.Length > 117) { message = string.Format("{0}…", message.Substring(0, 116)); } Log.WriteInfo("Twitter", "Tweeting \"{0}\" - {1}", message, url); try { ITweet tweet = new Tweet(string.Format("{0} {1}", message, url)); tweet.Publish(TwitterToken); } catch (Exception e) { Log.WriteError("Twitter", "EXCEPTION: {0}\n{1}", e.Message, e.StackTrace); } }