I'm using rails 3.2.11 and omniauth gem to authenticate users with their Facebook account.
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 would like to access album's pictures using the Facebook graph API for big brand facebook pages. I cann't get all the time. Its works for some Facebook pages. unable to find out a proper solution why I received an error like below and my page crashed.
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!'
Any solution ?
Thanks!