Re: [twitter gem] Unretweeting tweets?

29 views
Skip to first unread message

Steve Agalloco

unread,
Feb 17, 2017, 10:57:50 AM2/17/17
to twitter-...@googlegroups.com
Hi Alex,

unretweet support is in master, but I don't believe it is in a released version of the gem yet:


On Fri, Feb 17, 2017 at 9:58 AM, Alex White <alex_w...@outlook.com> wrote:
I think the title just about says it all, here's my code. I just want to be able to unretweet a tweet.
require "twitter"

config = {
    :consumer_key => "...",
    :consumer_secret => "...",
    :access_token => "...",
    :access_token_secret => "..."
}

client = Twitter::REST::Client.new(config)

tweets = client.search("pizza")
most_recent = tweets.take(1)
most_recent.each do |tweet|
    client.retweet(tweet.id)
    puts(tweet.text)
    #unretweet, tweet.status_destroy?
end

(This is cut from my actual program, I don't actually want to just tweet and immediately unretweet, I just wanted to show how I was doing everything else)

Thanks!

--
You received this message because you are subscribed to the Google Groups "Twitter Ruby Gem" group.
To post to this group, send email to twitter-ruby-gem@googlegroups.com.
Visit this group at https://groups.google.com/group/twitter-ruby-gem.

Reply all
Reply to author
Forward
0 new messages