简体   繁体   中英

How to get replies with twitterizer C#

I am willing to know how can I get the replies of a tweet?

I am not quite sure if this could be accomplished by using a trend or maybe passing a different API URL in an option file to the Retweets methos, I don't know by hard how to do it, any assistance will be well received.

To solve this, you need to do a Search:

TwitterResponse<TwitterSearchResultCollection> replies = TwitterSearch.Search(tokens, "term", options);

And loop thru the results:

foreach (var reply in replies.ResponseObject)
                { }

Please ensure to use:

if (reply.InReplyToScreenName != null && reply.InReplyToScreenName.ToLower().Equals("term"){}

To get the replies of the right user (the one that you looked for) Term is going to be replaced by the ScreenName that you look for ie: @rodbh08

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM