Hi , I want to retweet using tweetinvi but I got return null. I am sharing my code here please help asap.
ITweet data1 = null;
TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
{
data1 = Tweet.GetTweet(TweetID);
});
TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
{
data1 = data1.PublishRetweet();
});
and also I have used data1.PublishRetweet(); and data1.PublishRetweetAsync(); but among number of attempts I got retweeted once but never happened it again even i tried with number of new tweets.
Please help me to get out from this.
Thanks
Chandra
Comments: ** Comment from web user: linvi **
ITweet data1 = null;
TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
{
data1 = Tweet.GetTweet(TweetID);
});
TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
{
data1 = data1.PublishRetweet();
});
and also I have used data1.PublishRetweet(); and data1.PublishRetweetAsync(); but among number of attempts I got retweeted once but never happened it again even i tried with number of new tweets.
Please help me to get out from this.
Thanks
Chandra
Comments: ** Comment from web user: linvi **
Hi there,
I have just tested the exact same code you provided, with the same tweet and it worked perfectly well.
Is your data1 null before after the first operation?
Please check the latest exception from the [ExceptionHandler](https://tweetinvi.codeplex.com/documentation#Exceptions) and let me know if you have one. If you do please provide the details.
Linvi