How to reply a tweet using the Twitter gem?

╄→гoц情女王★ 提交于 2019-12-23 22:14:07

问题


r = 569186681850601472

client.update('@ooidesigns work', in_reply_to_tweet_id: r)

I'm trying to reply a tweet using the twitter gem and the Client (Twitter::REST) class, but only the the message is tweeted and it does not reply the tweet. Any help is appreciated


回答1:


Ok, so 569186681850601472 tweet is this, right? It is made by @Ksweeg user and not by @ooidesigns. Therefore, in order to reply to this tweet, you should specify @Ksweeg in your tweet text:

r = 569186681850601472

client.update('@Ksweeg test tweet', in_reply_to_status_id: r)



回答2:


I believe you are looking to use in_reply_to_status_id e.g.

client.update('@ooidesigns work', in_reply_to_status_id: 569186681850601472)



来源:https://stackoverflow.com/questions/28649582/how-to-reply-a-tweet-using-the-twitter-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!