|
|
How to update status of a specific user on twitter using LinqToTwitter I tried this :
twitterCtx = new TwitterContext(auth);
twitterCtx.UpdateStatus("Welcom " + DateTime.Now.ToString(), "userId");
the probleme is that update status of all my followers
Thanks,
|
|
Coordinator
Jun 16, 2012 at 7:53 PM
|
Hi,
When you do authentication, you must authenticate with the account of the person who you want to perform the update for. If during the OAuth authentication process, you sign into Twitter as yourself, the update will be performed on your account.
Is that what you're asking?
Joe
|
|
Jun 16, 2012 at 8:46 PM
Edited Jun 16, 2012 at 8:47 PM
|
here is my code :
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("Message " + DateTime.Now.ToString());
This code sends the message
to all my followers
I will either send the message to
a specific person (not
private message) post a tweet
Thanks,
|
|
Coordinator
Jun 16, 2012 at 10:13 PM
|
It sounds like you want to do a reply, which would work like this:
twitterCtx.UpdateStatus("@JoeMayo Message " + DateTime.Now.ToString());
In this code, you would replace "@JoeMayo" with the name of the person you want to reply to.
Joe
|
|
|
|
I tried but
does not work (the message is sent to
all my followers)
I tried with this
method (http://linqtotwitter.codeplex.com/wikipage?title=Updating%20Statuses)
but does not give anything
Thanks,
|
|
Coordinator
Jun 19, 2012 at 4:05 AM
|
Hi,
Do you have the URL of a test tweet I can look at?
Joe
|
|