Created
June 12, 2020 17:27
-
-
Save anuraj/2d594fd819b3536526517ad118d109d9 to your computer and use it in GitHub Desktop.
Create and Publish tweet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add reference of Tweetinvi | |
using Tweetinvi; | |
using Tweetinvi.Models; | |
public static void CreateTweet(string text) | |
{ | |
var credentials = new TwitterCredentials(TwitterConsumerKey, | |
TwitterConsumerSecret, | |
TwitterAccessToken, | |
TwitterAccessTokenSecret); | |
var client = new TwitterClient(credentials); | |
var tweet = client.Tweets.PublishTweetAsync(text).Result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment