tweetinvi: PublishTweetWithImage not working
Tweet.PublishTweetWithImage is not working for me. I receive no errors, it just doesn’t post to Twitter.
Tweetinvi version = 1.2.0.1 (nuget package)
I’m using it in an asp.net MVC application as follows:
byte[] imageBytes = webClient.DownloadData( imageUrl );
Tweet.PublishTweetWithImage( text, imageBytes );
The image is fine, example: http://s123.eu/uploads/media/1/b9272763d8e640b1ba16.jpg I receive the byte data, no issues there. Tweetinvi just doesn’t seem to post it on Twitter.
I also use Tweet.PublishTweet for tweets without image and that is working fine.
I also tried this alternative, but it is also not working:
var media = Tweetinvi.Upload.UploadImage( imageBytes );
Tweet.PublishTweet( text, new PublishTweetOptionalParameters { Medias = { media } } );
Any suggestions? Thanks. @Asshen
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 36 (4 by maintainers)
This also works,
Just tested just the tweetwithmedia model, public partial class Form1 : Form { public Form1() { InitializeComponent(); Auth.SetUserCredentials(“CONSUMER_KEY”, “CONSUMER_SECRET”, “ACCESS_TOKEN”, “ACCESS_TOKEN_SECRET”); }
http://unkindbrotherhood.com/favicon.png"); Tweet.PublishTweetWithImage(“Testing Tweet With Media”, imageBytes);
I replaced my keys and tokens with CONSUMER_KEY etc. just so that my keys aren’t available on email/github here
On Thu, Feb 2, 2017 at 8:04 PM, Unkind Jolt unkindjolt@gmail.com wrote: