You can implement it using the Twitterizer build. First, you can create a token that you can use to access Twitter, and then using this specific token, you can update TwitterStatus (Twitterizer.Core.TwitterObject.TwitterStatus). Sample code is as follows.
public void CreateCachedAccessToken(string requestToken) { string ConsumerKey = ConfigurationManager.AppSettings["ConsumerKey"]; string ConsumerSecret = ConfigurationManager.AppSettings["ConsumerSecret"]; OAuthTokenResponse responseToken = OAuthUtility.GetAccessToken(ConsumerKey, ConsumerSecret, requestToken);
To update TwitterStatus, you can do the following.
public OAuthTokens GetCachedAccessToken() { if (Session["AccessToken"] != null) { return (OAuthTokens)(Session["AccessToken"]); } else { return null; } } TwitterStatus.Update(GetCachedAccessToken(), txtTweet.Trim());
The method below can be used to implement the sign.
protected string GetTwitterAuthorizationUrl() { string ConsumerKey = ConfigurationManager.AppSettings["ConsumerKey"]; string ConsumerSecret = ConfigurationManager.AppSettings["ConsumerSecret"]; OAuthTokenResponse reqToken = OAuthUtility.GetRequestToken(ConsumerKey, ConsumerSecret); return "https://twitter.com/oauth/authorize?oauth_token=" + reqToken.Token; }
Hope this helps. If there is any clarification, please raise. Thanks
source share