我收到一个错误:
OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a
`code` parameter or a signed request (via `signed_request` parameter or a
`fbsr_XXX` cookie)):
它不会一直来。它会时不时地来,由空气制动通知。
谷歌搜索上有很多链接,但找不到合适的解决方案..有人吗?初始化程序目录下的omniauth.rb:
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}, :scope => 'user_about_me,email,publish_actions,user_location,publish_stream,offline_access,user_interests,user_likes,user_hometown', :display => 'popup'}
OmniAuth.config.on_failure = Proc.new do |env|
#this will invoke the omniauth_failure action in SessionsController.
"SessionsController".constantize.action(:omniauth_failure).call(env)
end
end