我正在使用rails 3.2.11和omniauth gem通過他們的Facebook帳戶驗證用戶身份。OmniAuth NoAuthorizationCodeError
的Gemfile
gem 'omniauth-facebook', '1.4.0'.
/config/initializers/omniauth.rb
require 'facebook'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, "#{Facebook::APP_ID.to_s}", "#{Facebook::SECRET.to_s}" ,{:scope => "email, offline_access, manage_pages"}
end
的routes.rb
match "/auth/:provider/callback" => "public_new_pages#auth_callback", :as => :callback
match "/auth/failure" => "public_new_pages#failure", :as => :failure
I W應該使用面向大品牌臉書頁面的Facebook圖表API訪問相冊的圖片。我無法獲得所有的時間。它的作品爲一些Facebook頁面。 無法找到一個合適的解決方案,爲什麼我收到如下錯誤和我的網頁崩潰。
In browser I see Internal server error 500. and in console I see the error
below when I tried to create a big site called "BMW"
Started GET "/auth/facebook/callback" for 66.249.74.126 at 2013-03-17 01:10:45
**OmniAuth::Strategies::Facebook::NoAuthorizationCodeError
(must pass either a `code` parameter or a signed request**
(via `signed_request` parameter or a `fbsr_XXX` cookie)):
omniauth-facebook (1.4.0) lib/omniauth/strategies/facebook.rb:177:in
`with_authorization_code!'
任何解決方案?
謝謝!
http://stackoverflow.com/questions/12370056/omniauth-strategies-facebook-noauthorizationcodeerror-must-pass-either-a-code – ajbraus 2014-01-19 15:48:42