Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Get all your tweets from Twitter

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 Rakefile
Octocat-spinner-32 last-year.rb
Octocat-spinner-32 mentions.rb
Octocat-spinner-32 mytweets.rb
Octocat-spinner-32 random.rb
Octocat-spinner-32 replies.rb
Octocat-spinner-32 searcher.rb


Fetches all of your tweets from Twitter, saving them to a json file.

Setup (or: oauth sucks)

  • Create a file in this directory named config.rb
  • Create an app for my-tweets at (lame, right?)
  • In config.rb:
    • Set CONSUMER_KEY to your consumer key
    • Set CONSUMER_SECRET to your consumer secret
  • Find your app id (
  • Visit
  • In config.rb:
    • Set TOKEN to your access token
    • Set TOKEN_SECRET to your access token secret
  • 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.

Search your Tweetion (all your tweets)

$ ruby searcher.rb something


$ irb
>> require 'searcher'
=> true
>> /hello/i

See who you mention

$ ruby mentions.rb

You can limit:

$ ruby mentions.rb --limit 10

Warning: You may be surprised at you talk to the most.

See who you reply to

$ ruby replies.rb

Again, you can limit:

$ ruby replies.rb --limit 10

Inspired by

Something went wrong with that request. Please try again.