0

尝试基于https://github.com/tweetstream/tweetstream构建一个 Twitter 应用程序。但是在http://www.rubydoc.info/gems/tweetstream/TweetStream/Client——我怎么会忽略转推?

这有效

TweetStream::Client.new.follow(14252, 53235) do |status|
  puts "#{status.text}"
end

尝试排除转推失败 #1

# both block arg and actual block given (SyntaxError)

TweetStream::Client.new.follow(14252, 53235).reject(&:retweet) do |status|
  puts "#{status.text}"
end

尝试排除转推失败 #2

# No errors but also no tweets appearing

TweetStream::Client.new.follow(14252, 53235) do |status|
  unless status.retweet
    puts "#{status.text}"
  end
end
4

0 回答 0