TwitterStatus.Update not updating the messages on user's twitter wall after being authenticated


#1

Hi Team,

I have a written a code to write the static text on the user’s twitter wall with the below code but its not updating the messages on user’s wall.

This is an MVC 4 website application.

Settings ::

Website : http://127.0.0.1/Index

Application Type : Read, Write and Access direct messages

Callback URL: : http://127.0.0.1/Home/TwitterCallBack

My call back URL is fired correctly and there is no issues with URL’s its giving the access token correctly but not posting the messages

Code ::

View : <a href="@Url.Action(“TwitterShare”,“Home”)"
class="twitter-share-button"
data-text=“Hello"
data-url =”"
data-count=“none” >Tweet

    public void TwitterShare()
    {
        OAuthTokenResponse reqToken = OAuthUtility.GetRequestToken("ECKYCEAwDrNCiIhZUIBgzg", "xg0oij5dfGYiP07eyGhL8blUQnGgUxvqmXd8cVBugyc", "http://localhost:57151/Home/TwitterCallBack");
        string url = "https://twitter.com/oauth/authorize?oauth_token=" + reqToken.Token;
        Response.Redirect(url);
    }

public void TwitterCallBack()
{
String requestToken = Request.QueryString[“oauth_token”];
String requestVerifier = Request.QueryString[“oauth_verifier”];
OAuthTokenResponse responseToken = OAuthUtility.GetAccessToken(“ECKYCEAwDrNCiIhZUIBgzg”, “xg0oij5dfGYiP07eyGhL8blUQnGgUxvqmXd8cVBugyc”, requestToken, requestVerifier);

        OAuthTokens tokens = new OAuthTokens();
        tokens.AccessToken = responseToken.Token;
        tokens.AccessTokenSecret = responseToken.TokenSecret;
        tokens.ConsumerKey = "ECKYCEAwDrNCiIhZUIBgzg";
        tokens.ConsumerSecret = "xg0oij5dfGYiP07eyGhL8blUQnGgUxvqmXd8cVBugyc";
        string message = " Test Messages";
        TwitterStatus.Update(tokens, message);
    }

Could you please help in updating the static message on user’s twitter page.

Thanks,
Chakri


#2