Before you get started, I'm assuming you've got the following setup on your machine:
- Rails-3
- RVM
$ rails new OAuthExample
$ echo "rvm --create 1.9.2-p180@oauthexample" > OAuthExample/.rvmrc
$ cd OAuthExample
$ gem update
$ bundle install
$ ./script/rails s
gem 'omnisocial', '0.1.2'
$ bundle update
$ rails g omnisocial
config.twitter 'sekret_Key', 'sekret_Secret'
rake db:migrate
./script/rails g controller welcome index
<h1>Hello Phoenix Rubyists</h1>
<p>Find me in app/views/welcome/index.html.erb</p>
<%= link_to "Login", login_path %>
<% if current_user? %>
<p>
Hello, <strong><%= current_user.login %></strong>
</p>
<p>
<%= link_to "Logout", logout_path %>
</p>
<% end %>
rm public/index.html
$ ./script/rails s
Click on login