linvi / tweetinvi

Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
MIT License
1.01k stars 220 forks source link

How to get retweets from a particular user. #1210

Closed Tronald closed 1 year ago

Tronald commented 1 year ago

Thank you for this great product. I am struggling a bit with determining a specific user's retweet activity. The documentation is great for determining the retweets of specific tweets, but I can't find much in the way of determining a specifics user's retweet activity.

For example IUser.GetUserTimlineAsync() will gather all of a users tweets, perfectly but does not seem to list retweets made by the user.

How do you gather all retweets retweeted by a user (like you would see if going to their profile)?

Any information is greatly appreciated!

Tronald commented 1 year ago

Nevermind, I finally figured this out. Solution was to use a good ol' fashioned query.

await userClient.Search.SearchTweetsAsync($"from:[USERNAME] filter:retweets");