John R
John R

Reputation: 301

Omniauth+Devise+Facebook = An error occurred. Please try again later

I followed these instructions verbatim: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview

config/initializers/devise.rb:

require "omniauth-facebook"
config.omniauth :facebook, "xxx", "yyy", :scope => 'email,offline_access,read_stream', :display => 'popup'

The View link works and it asks me to Sign In with Facebook. However, when clicking it, I get "An error occurred. Please try again later.". No other information or errors.

In my facebook app, 'app domain' is not set, and site URL is set to 'localhost:3000'.

My gut is telling me there is something wrong with that configuration/callback, however localhost:3000/users/auth/facebook/callback works fine.

Thanks in advance!

EDIT: When I try the login while logged in to the Facebook account that owns the app, it works perfectly. When I try with a different Facebook account, this error fires.

EDIT 2: Figured it out http://cl.ly/D6st

Upvotes: 0

Views: 826

Answers (1)

Bernard Banta
Bernard Banta

Reputation: 755

Go to your facebook application's settings set sandboxto disable

Thats all.

Upvotes: 1

Related Questions