Why is the twitter oauth access token invalid / expired (rails 3)
Try changing this:
Twitter::Client.new(:token => provider.token, :secret => provider.secret)
into this
Twitter::Client.new(:oauth_token => provider.token, :oauth_token_secret => provider.secret)
How to use Twitter gem in Rails, need small to figure out the whole thing?
Use client
instead of Twitter
.
You can see here how you should do it.
how can I get users to log in correctly on rails 3? instead of just getting redirected to the visitor front page
I would move the sign_in
helper functions to ApplicationHelper
so that you can use them in places other than the SessionsController
.
After that, it should be very simple.
def sign_in_and_redirect user
sign_in user
redirect_to root_url # or wherever you want
end
It might even be easier to just do sign_in user and redirect_to root_url
instead of using another helper.
Related Topics
Mini_Magick Gem Doesn't Work with My Imagemagick Install
Bundler How to Uninstall Conflicting Dependency
Rails 6: Only One Profile Per User Should Be Created
Rails Object#Blank? VS. String#Empty? Confusion
Jekyll Plugin Not Work on Github
Regexp Search Through a Very Large File
Recursively Convert Hash Containing Non-Utf Chars to Utf
Error in Install Ruby-Debug-Base on Ruby 2.0.0P247
Reverse a String Each Two Characters with Ruby
How to Get Multiple-Line User Input in Ruby
Ruby 1.8: Hash#Sort Not Return Hash But Array (Better Way to Do This)
Confused with Ruby Accessor Methods
How to Access a Class Variable from the Outside in Ruby
Ruby Getting Deeply Nested JSON API Data
How to Http Post Stream Data from Memory in Ruby