locked
Sending Tweet via Twitterizer in ASP.NET RRS feed

  • Question

  • User-1763610841 posted

    Hi

    I am unable to find the exact solution to "send tweet via Twitterizer in asp.net". I am building a gaming application, in which I have a generic handler that inserts the game in DB and portal from the publisher website. I want to add the functionality of sending a Tweet when a new game is added from a Twitter account already registered and working @gamefiz. I have registered the application in Twitter developer API and have all tokens but unable to find a straight forward solution to send a Tweet (no complexity just send a tweet from @gamefiz that's it). I am using Twitterizer API for this purpose but the examples seem complex.

    Please guide me in right direction. Thanks.

    Wednesday, February 8, 2012 4:27 AM

Answers

  • User-1763610841 posted

    Hi, Thanks I was able to do this time. I think it was getting blocked due to some internet/proxy settings yesterday. so simple for a single user: Just get all token/secret values from dev.twitter, create an OAuthTokens object and call Update. 

     OAuthTokens tokens = new OAuthTokens();
    
                tokens.ConsumerKey = consumerKey;
                tokens.ConsumerSecret = consumerSecret;
                tokens.AccessToken = accessToken;
                tokens.AccessTokenSecret = accessTokenSecret;
    
                //Twitterizer.Data.
    
                TwitterResponse<TwitterStatus> tweetResponse = TwitterStatus.Update(tokens,
                    "Sent via Twitterizer");
    
                Console.WriteLine("Result: {0}", tweetResponse.Result.ToString());
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 8, 2012 7:10 AM

All replies

  • User455156504 posted

    Hi Syed,

    did you check this site? It contains a step-by-step instruction how to send a tweet via Twitterizer.

    Wednesday, February 8, 2012 6:39 AM
  • User-1763610841 posted

    Thx but I did check this site, but this is an example of multi user thing a generic one that uses redirects and any user can use this. What I want is a simple ripped off version that I can use for a single user inside an .ashx page

    Wednesday, February 8, 2012 6:59 AM
  • User-1763610841 posted

    Hi, Thanks I was able to do this time. I think it was getting blocked due to some internet/proxy settings yesterday. so simple for a single user: Just get all token/secret values from dev.twitter, create an OAuthTokens object and call Update. 

     OAuthTokens tokens = new OAuthTokens();
    
                tokens.ConsumerKey = consumerKey;
                tokens.ConsumerSecret = consumerSecret;
                tokens.AccessToken = accessToken;
                tokens.AccessTokenSecret = accessTokenSecret;
    
                //Twitterizer.Data.
    
                TwitterResponse<TwitterStatus> tweetResponse = TwitterStatus.Update(tokens,
                    "Sent via Twitterizer");
    
                Console.WriteLine("Result: {0}", tweetResponse.Result.ToString());
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 8, 2012 7:10 AM