|
Revision 19, 0.7 kB
(checked in by njw, 3 years ago)
|
|
minor fix to since-query-awkward
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | require 'rubygems' |
|---|
| 11 | require 'activesupport' |
|---|
| 12 | require 'twitter' |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | httpauth = Twitter::HTTPAuth.new('YOUR_USERNAME', 'PASSWORD') |
|---|
| 17 | twitter = Twitter::Base.new(httpauth) |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | chunk = twitter.user_timeline |
|---|
| 21 | while chunk do |
|---|
| 22 | chunk.each do |s| |
|---|
| 23 | twitter.status_destroy(s.id) |
|---|
| 24 | puts "Deleted tweet: [#{s.id}] \"#{s.text}\" (#{s.created_at})" |
|---|
| 25 | end |
|---|
| 26 | chunk = twitter.user_timeline |
|---|
| 27 | end |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | twitter.update("Hey! Ho! Let's Go #rmallyourtweets http://foobla.wigbels.de/tag/delete-all-tweets/") |
|---|