Efe Imoloame
Efe Imoloame

Reputation: 109

How to reply a tweet using the Twitter gem?

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

Upvotes: 2

Views: 1170

Answers (2)

Rustam Gasanov
Rustam Gasanov

Reputation: 15781

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)

Upvotes: 3

jmccure
jmccure

Reputation: 1249

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

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

Upvotes: 0

Related Questions