Credits goes to https://twitter.com/theSeanCook for doing the sample. I just cleaned it up, added a way to manage credentials with keychain and put it up on Cocoapods - since I needed it as a dependency for http://github.com/seivan/SHOmniAuthTwitter
It's probably better to use http://github.com/seivan/SHOmniAuthTwitter for your project as it handles edge cases and errors better.