I am trying to connect to Facebook using omniauth-facebook in Rails 3.2.9; I followed the steps of Ryan Bates at http://railscasts.com/episodes/360-facebook-authentication , and at that very moment I have the same code.
If I try to log in without Javascript, it will work (I need to go to Facebook, I grant permissions and return my application), but if I try to use Javascript (for the Facebook popup), it first shows a popup for logging in, but then it does a redirect and gives me this error (without asking permission):
Started GET "/auth/facebook/callback" for 127.0.0.1 at 2012-11-16 15:16:03 -0600 (facebook) Callback phase initiated. (facebook) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError OmniAuth::Strategies::OAuth2::CallbackError (OmniAuth::Strategies::OAuth2::CallbackError)
This is a very common mistake; I did research and tried all the solutions (mostly a few months ago), but none of them work. This is what I tried:
- Facebook sandbox checking is disabled (and I waited an hour for distribution)
- Checking the URL of the site
http://localhost:3000/ - Verifying the application and application ID
- Lower the omniauth-facebook pearl to 1.4 and throw me this error:
omniauth-facebook must pass either a code parameter or a signed request (via signed_request parameter or a fbsr_XXX cookie) - Upgrading to Rails 3.2.8
What else should I do? (I think the key is in Javascript, and now I have the same video code with CoffeeScript). Thanks in advance!
pablomarti
source share