TwitterAPI。配列に入った複数の要素をOR検索
query = ["キーワード","キーワード","キーワード"]
if query.present?
new_q = query.to_s.gsub!(/,/,"+OR+").gsub!(/\s|"|\[|\]/,"")
results = @client.search(new_q, count: 16, result_type: "recent", exclude: "retweets", filter: "images")
results.take(16).each do |tw|
@client.favorite(tw.id)
puts "#{tw.text}をファボしました"
end
end