I am relatively new to programming in C# (Learning on my own for a school project) and decided to try using TweetInvi to implement Twitter functionality. So far it\'s going goo
You can try something like this:
public string PublishTweet(string text)
{
var appCredentials = new TwitterCredentials(_apiKey,_apiSecret, _accessToken, _accessTokenSecret);
Tweetinvi.Auth.SetCredentials(appCredentials);
text = "my tweet";
var publishedTweet = Tweetinvi.Tweet.PublishTweet(text);
var tweetId = publishedTweet.Id.ToString();
return tweetId;
}
You just need to get the published tweet into a var
for the result of the PublishTweet() method then you select the field(s) you need.
Simple solution. As explained before you need to take the tweet back from PublishTweet
.
string text = "text";
ITweet tweet = Tweet.PublishTweet(text);
bool destroySuccess = tweet.Destroy();