Click here to Skip to main content
15,887,295 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I tried with this code to post on the wall (Twitter) of a user

C#
if (credentials.ConsumerKey == null || credentials.ConsumerSecret == null)
{
   credentials.ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"];
   credentials.ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"];
}

auth = new MvcAuthorizer
{
   Credentials = credentials
};

auth.CompleteAuthorization(Request.Url);

if (!auth.IsAuthorized)
{
   Uri specialUri = new Uri(Request.Url.ToString());
   return auth.BeginAuthorization(specialUri);
}

twitterCtx = new TwitterContext(auth);
                    
twitterCtx.UpdateStatus("Welcome");         

Problem: the first test goes well, I posted on the wall the second test shows this error:

Error while querying Twitter.

someone can help me to solve this problem

Thanks.
Posted
Updated 15-Jun-12 7:24am
v2

1 solution

Twitter doesn't allow duplicate message.
to guarantees that the text of each message will be different
i'm using : twitterCtx.UpdateStatus("Welcome - " + DateTime.Now.ToString());
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900