private void btnTweet_Click(object sender, EventArgs e) { TweetActions tweetActions = new TweetActions(this.Tokens); TwitterStatus status = tweetActions.UpdateStatus(txtTweet.Text); if (status == TwitterStatus.Success) MessageBox.Show("You updated your status successfully"); else MessageBox.Show("Something went wrong", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); txtTweet.Text = ""; }
protected void Button3_Click(object sender, EventArgs e) { OAuthTokens tokens = (OAuthTokens)Session["OAuthTokens"]; TweetActions tweet = new TweetActions(tokens); TwitterStatus status=tweet.UpdateStatus(txtStatus.Text); }