How send a Tweet

Dec 5, 2014 at 1:59 PM
Hi!
I just started to use your libraries so I'm a newbie.
I can register, get story of my tweet and find friends, but con't tweet (update my state):

This is my code:

private void tweetClick(object sender, RoutedEventArgs e)
    {
        // Publish simple tweet
        //var tweet = Tweet.PublishTweet("Hello!");

        //var tweet = Tweet.CreateTweet("Hello");
        //Tweet.PublishTweet(tweet);

        //var tweet = Tweet.CreateTweet("Hello");
        //tweet.Publish();

        var credentials = TwitterCredentials.Credentials;

        TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
        {
            Tweet.PublishTweet("myTweet");
        });
    }
i've tried all options, but i can't see my tweet on my tweeter profile.
I've add all library.

Someone can help me ??

Thank's a lot!

Alex
Coordinator
Dec 8, 2014 at 6:22 PM
By any chance, are your credentials valid?

Is the Tweet.PublishTweet result null? If yes, it mean that there is an error that you can find in the ExceptionHandler.

Your code is correct, so something must be wrong with your configuration or credentials.

Linvi
Dec 9, 2014 at 9:09 AM
Hi, thanks for the reply.
I'suppose that my credentials are valid, because i can get friends list and all tweets posted.

The Tweet.PublishTweet result is FALSE, even newTweet.IsTweetPublished.
Maybe I've to use Token ? I've read some example in an other discussion (here https://tweetinvi.codeplex.com/discussions/472288), but I can't use

IToken token = new Token("My Access token", "My Access token secret", "My Consumer key", "My Consumer secret");

because VS can't find reference even if I've add all reference:

Tweetinvi.
Tweetinvi.Controllers
Tweetinvi.Core
Tweetinvi.Credentials
Tweetinvi.Factories
Tweetinvi.Logic
Tweetinvi.Security
Tweetinvi.Streams
Tweetinvi.WebLogic

thanks
Alex.
Dec 9, 2014 at 10:37 AM
Well, maybe I get It.

I thought that token credential was always valid.
But I've to generate them each time, so must use the methods to create the token, but as I've wrote before I can't use in my code.
Could you tell me how I can ?

Thanks a lot!
Alex
Coordinator
Dec 9, 2014 at 6:14 PM
Hi,

I think what is wrong here is that you have not set the privileges of your application to Update (on apps.twitter.com).
The discussion you referred to is out of date. The token should no longer be used in Tweetinvi.

If updating the privileges of your application on twitter does not work, please give me the information available in the ExceptionHandler.

Linvi
Marked as answer by linvi on 12/10/2014 at 5:49 AM
Dec 10, 2014 at 11:02 AM
Hi.

It's seems all working good.

Thank you!

Alex
Dec 11, 2014 at 9:38 AM
Hi!

I get this exception:

Too Many Requests - Returned in API v1.1 when a request cannot be served due to the application's rate limit having been exhausted for the resource.
See Rate Limiting in API v1.1.

what's mean ?

Thanks!
Alex