Post message in Twitter from ASP.Net Website

Steps to Post message in Twitter from ASP.Net Website is given below.

1)Create an Application in Twitter App using below link.


Use your twitter login ID to get the API key and API Secret.

2)Add the keys in the code and add reference to Twitter API DLL.

Download DLL for Twitter API here

Aspx Code

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <h2>Post status message to Twitter account from ASP.Net Website</h2>
            <asp:Button ID="btnAuthorize" runat="server" Text="Authorize" OnClick="btnAuthorize_Click" CausesValidation="false" />
            <hr />
            <asp:Panel runat="server" ID="pnlTweet" Enabled="false">
                <asp:TextBox ID="txtTweet" runat="server" TextMode="MultiLine" Height="50"></asp:TextBox><br />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTweet"
                    ErrorMessage="Required" ForeColor="Red"></asp:RequiredFieldValidator>
                <br />
                <asp:Button ID="btnTweet" runat="server" Text="Tweet" OnClick="btnTweet_Click" />



The below demo shows how user gets authorized to twitter using Twitter API in ASP.Net and also post comment in twitter.



Posted Message in Twitter

Post message in Twitter from ASP.Net Website


Demo Code