Reputation: 2961
I am using TweetSharp for an little twitter application. I am able to select an tweet and retweet it... but I can't find a way to undo that action.
Is that functionality not available in TweetSharp or is it just me :) ?
Upvotes: 1
Views: 3019
Reputation: 6625
To fix the case where one may be getting an error 86 or HTTP 400 Bad Request with TweetSharp, fork/download the source at https://github.com/danielcrenna/tweetsharp and locate these lines (7-8) in _TwitterService.2.Tweets.json.
// https://dev.twitter.com/docs/api/1.1/post/statuses/destroy/%3Aid
TwitterStatus, "statuses/destroy/{id}":DELETE, DeleteTweet, long id, bool trim_user
Fix line #8 to use POST instead of DELETE:
// https://dev.twitter.com/docs/api/1.1/post/statuses/destroy/%3Aid
TwitterStatus, "statuses/destroy/{id}":POST, DeleteTweet, long id, bool trim_user
Rebuild the library, and in TwitterService.generated.cs, you should be able to locate output that looks like this:
public virtual TwitterStatus DeleteTweet(DeleteTweetOptions options)
{
var id = options.Id;
var trim_user = options.TrimUser;
return WithHammock<TwitterStatus>(WebMethod.Post, "statuses/destroy/{id}", FormatAsString, "?id=", id, "&trim_user=", trim_user);
}
Upvotes: 1
Reputation: 2961
I Found a solution, First you have to get your retweet message by using the original tweet Id and with that result you get the retweet Id. With that Id you can call "DeleteTweet"... then it will work.
Upvotes: 0