0

Well i am workin on a c# application and i want to be able to send tweets to multiple twitter accounts . I wanted to know is it possible ?

Edit : Sorry for not being specific :D How can it be done ?

Amrit Singh
  • 3
  • 1
  • 6

2 Answers2

1

The short answer to your question is: Yes.

The a bit longer answer is: Yes it's easily possible and I would recommend to you to have a look at LINQ to Twitter. This library is very simple to use and allows you to connect to twitter in no-time:

    var auth = new ApplicationOnlyAuthorizer
        {
            CredentialStore = new InMemoryCredentialStore
            {
                ConsumerKey = "twitterConsumerKey",
                ConsumerSecret = "twitterConsumerSecret"
            }
        };

        auth.AuthorizeAsync();

        var twitterCtx = new TwitterContext(auth);
        var tweet = twitterCtx.TweetAsync("Hello world");

Auth part copied from Joe Mayo here: Twitter API application-only authentication (with linq2twitter)

Erick Boshoff
  • 1,443
  • 2
  • 18
  • 30
Chief Wiggum
  • 2,784
  • 2
  • 31
  • 44
  • But its no longer updated. Also its using twitter api 1.0 but the api has been updated to 1.1 – Amrit Singh May 21 '13 at 05:10
  • Can you show an example as of what i read oauth is nessary but then i will need to auth all the multiple accounts – Amrit Singh May 21 '13 at 05:12
  • LINQ to twitter has an excellent documentation available here: http://linqtotwitter.codeplex.com/documentation – Chief Wiggum May 21 '13 at 05:14
  • You might want to have a look at this question as well when it comes to auth: http://stackoverflow.com/questions/16387037/twitter-api-application-only-authentication-with-linq2twitter – Chief Wiggum May 21 '13 at 05:16
  • Just combined the one liner with the auth part from Joe Mayo. You should be able to use the nuget package from LINQ2Twitter and with the few lines of code it can be done in 5min... Do you need more help? – Chief Wiggum May 21 '13 at 05:27
  • I followed your method but i am getting this error while i try to update my status Your credentials do not allow access to this resource – Amrit Singh May 21 '13 at 08:34
  • i also set my twitter application Access level to read and write – Amrit Singh May 21 '13 at 08:35
  • Mmmh, no sorry, can't help you there right now. This might help you to figure out the problem. Otherwise ask a new specific question for the issue: https://dev.twitter.com/docs/auth/application-only-auth – Chief Wiggum May 21 '13 at 08:45
0

take a look at tutorial how set tweet with twitter API here

Vivek Raj
  • 459
  • 5
  • 16