Wolfie
Wolfie

Reputation: 1

tweetinvi - No error, no tweet

I am trying to send a tweet with an image from disk. My current code is below:

try
        {
            Auth.SetUserCredentials(consumerkey, consumersecret, accesstoken, accesstokenSecret);
            Tweet.PublishTweetWithImage(message, File.ReadAllBytes(filePath));
        }
        catch (Tweetinvi.Exceptions.TwitterException x)
        {
            MessageBox.Show(x.Message.ToString());
        }

The code appears to run, no exception is returned, but yet the tweet is not posted. Appreciate any help or insight.

Upvotes: 0

Views: 117

Answers (1)

Linvi
Linvi

Reputation: 2087

Please check the documentation for ExceptionHandler : https://github.com/linvi/tweetinvi/wiki/Exception-Handling.

ExceptionHandler.SwallowWebExceptions = false;

The exception will then be raised.

Upvotes: 0

Related Questions