Skip to content

Commit

Permalink
Fixed a bug with retweets.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMayo committed Apr 25, 2020
1 parent 3aef8f7 commit 8bcd8ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static async Task ReplyAsync(TwitterContext twitterCtx)

static async Task RetweetAsync(TwitterContext twitterCtx)
{
ulong tweetID = 401033367283453953;
ulong tweetID = 1250088275861049345;

Status retweet = await twitterCtx.RetweetAsync(tweetID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ await TwitterExecutor.PostFormUrlEncodedToTwitterAsync<Status>(
/// </summary>
/// <param name="tweetID">ID of tweet being retweeted.</param>
/// <returns>Retweeted tweet.</returns>
public virtual async Task<Status> RetweetAsync(ulong tweetID, TweetMode tweetMode = TweetMode.Compat, CancellationToken cancelToken = default(CancellationToken))
public virtual async Task<Status> RetweetAsync(ulong tweetID, CancellationToken cancelToken = default(CancellationToken))
{
if (tweetID == MissingID)
throw new ArgumentException("0 is *not* a valid tweetID. You must provide the ID of the tweet you're retweeting.", "tweetID");

var retweetUrl = BaseUrl + "statuses/retweet/" + tweetID + ".json?tweet_mode=" + tweetMode.ToString().ToLower();
var retweetUrl = BaseUrl + "statuses/retweet/" + tweetID + ".json";

RawResult = await TwitterExecutor
.PostFormUrlEncodedToTwitterAsync<Status>(HttpMethod.Post.ToString(), retweetUrl, new Dictionary<string, string>(), cancelToken)
Expand Down

0 comments on commit 8bcd8ab

Please sign in to comment.