Fetches all of your tweets from Twitter, saving them to a json file.
- Create a file in this directory named
config.rb
- Create an app for my-tweets at twitter.com/apps (lame, right?)
- In config.rb:
- Set
CONSUMER_KEY
to your consumer key - Set
CONSUMER_SECRET
to your consumer secret
- Set
- Find your app id (http://twitter.com/oauth_clients/details/THIS-IS-YOUR-APPID)
- Visit
http://dev.twitter.com/apps/YOUR-APP-ID/my_token
- In config.rb:
- Set
TOKEN
to your access token - Set
TOKEN_SECRET
to your access token secret
- Set
- Finally, set
USERNAME
in config.rb to whatever username you want to get tweets for.
Sucks, right?
Then run the script:
$ ruby mytweets.rb
You can also dump all of your tweets to the terminal as JSON if you want:
$ ruby mytweets.rb --verbose
Make sure you've already run ruby mytweets.rb
before you attempt these.
$ ruby searcher.rb something
or:
$ irb
>> require 'searcher'
=> true
>> Tweetion.search /hello/i
$ ruby mentions.rb
You can limit:
$ ruby mentions.rb --limit 10
Warning: You may be surprised at you talk to the most.
$ ruby replies.rb
Again, you can limit:
$ ruby replies.rb --limit 10
Inspired by github.com/simonw/mytweets