<commit_before># OmniAuth Twitter

This gem contains the Twitter strategy for OmniAuth.

Twitter uses the OAuth 1.0a flow, you can read about it here: https://dev.twitter.com/docs/auth/oauth

## How To Use It

Usage is as per any other OmniAuth 1.0 strategy. So let's say you're using Rails, you need to add the strategy to your `Gemfile`:

    gem 'omniauth-twitter'

You can pull them in directly from github e.g.:

    gem 'omniauth-twitter', :git => 'https://github.com/arunagw/omniauth-twitter.git'

Once these are in, you need to add the following to your `config/initializers/omniauth.rb`:

    Rails.application.config.middleware.use OmniAuth::Builder do
      provider :twitter, "consumer_key", "consumer_secret" 
    end

You will obviously have to put in your key and secret, which you get when you register your app with Twitter (they call them API Key and Secret Key). 

Now just follow the README at: https://github.com/intridea/omniauth

## Supported Rubies
<commit_msg>update README for username feature<commit_after># OmniAuth Twitter

This gem contains the Twitter strategy for OmniAuth.

Twitter uses the OAuth 1.0a flow, you can read about it here: https://dev.twitter.com/docs/auth/oauth

## How To Use It

Usage is as per any other OmniAuth 1.0 strategy. So let's say you're using Rails, you need to add the strategy to your `Gemfile`:

    gem 'omniauth-twitter'

You can pull them in directly from github e.g.:

    gem 'omniauth-twitter', :git => 'https://github.com/arunagw/omniauth-twitter.git'

Once these are in, you need to add the following to your `config/initializers/omniauth.rb`:

    Rails.application.config.middleware.use OmniAuth::Builder do
      provider :twitter, "consumer_key", "consumer_secret" 
    end

You will obviously have to put in your key and secret, which you get when you register your app with Twitter (they call them API Key and Secret Key). 

Twitter also optionally supports specifying a username when authenticating. This is handy when your application supports multiple twitter accounts since you can prompt the user to login to the correct account (and not defaulting to the current login). 

To use this, just add a querystring for screen_name. 

	/auth/twitter?screen_name=scottw

Now just follow the README at: https://github.com/intridea/omniauth

## Supported Rubies

{'fraction_non_alphanumeric': 0.07451820128479657, 'fraction_numerical': 0.003426124197002141, 'mean_word_length': 4.0344827586206895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '550906', 'n_tokens_mistral': 703, 'n_tokens_neox': 654, 'n_words': 304}