简体   繁体   中英

Twitterizer - How to post a reply?

I'm using the Twitterizer wrapper for a new ASP.NET project. I have a gridview showing me the twitter timeline. I have a button in every row to reply to a specific status message. But i just reply a message like this: "@screenName this is a reply". This is just a new statusupdate on my twitter. But the in_reply_to_user_id field of that status is not filled in. What should i do to reply correctly to a message?

One of the TwitterStatus.Update(...) overloads accepts a StatusUpdateOptions parameter. This parameter allows you to specify the status that a tweet is in reply to with a InReplyToStatusId property.

For example, (I'm freehanding this code)

StatusUpdateOptions options = new StatusUpdateOptions();
options.InReplyToStatusId = 12345;
TwitterResponse<TwitterStatus> replyResult = TwitterStatus.Update(tokens, "@somebody this is a reply", options);

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