Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created February 12, 2011 06:11
Show Gist options
  • Save yaotti/823562 to your computer and use it in GitHub Desktop.
Save yaotti/823562 to your computer and use it in GitHub Desktop.
これをRoR 3.0で使おうとしている
https://github.com/tardate/rails-twitter-oauth-sample
before_filterのoauth_login_requiredは呼ばれている
callback url: hoge.com/users/callback
で,コールバック時にエラー
Error message
>>
Unknown action
The action 'callback' could not be found for UsersController
<<
require 'json'
require 'oauth'
require 'twitter_oauth'
module OauthSystem
# controller method to handle twitter callback (expected after login_by_oauth invoked)
def callback
# ...
end
# ...
protected
# private methods ...
end
class UsersController < ApplicationController
# include the oauth_system mixin
require 'oauth_system'
include OauthSystem
# specify oauth to be on all user-specific actions
before_filter :oauth_login_required, :except => [ :callback, :signout, :index, :show ]
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment