PublishTweet tweet with Media
The release 0.9.2.x allows developers to send media to the server.This is particularly useful in order to send tweet with a media attached to it.
byte[] file = File.ReadAllBytes(filePath); var tweet = Tweet.CreateTweetWithMedia(text, file); var imageURL = tweet.Entities.Medias.First().MediaURL;
Please note that even if Twitter allows multiple files to be sent at once, most of the accounts are limited to post only 1 media with a tweet. If you add 2 and your account is not authorized to do so, the request will be processed but only the first media will be published.
Other updates
Filter stream by language
All the stream are now able to filter the tweets to be in a specific language.var stream = Stream.CreateSampleStream();
stream.FilterTweetsToBeIn(Language.French);
stream.TweetReceived += (s, args) =>
{
Console.WriteLine(args.Tweet.Text);
};
stream.StartStream();
Since parameter for search
The search did not have a since parameter before because the documentation does not mention it. Now it does. Keep in mind that the search may not go back as far as the date you specify!var searchQuery = Search.GenerateSearchTweetParameter("tweetinvi"); searchQuery.Since = DateTime.Now; var searchResult = Search.SearchTweets(searchQuery);
Search Json
You can now retrieve json from search resultsvar jsonResult = SearchJson.SearchTweets("tweetinvi");