3

My facebook is just approved today. However,when I clicked on "Go to app", it returns Rail 422 " The change you wanted was rejected. error" I set my Canvas URL to my site url and I am using Omniauth, so I am just wondering what did I miss.

JayX
  • 1,754
  • 1
  • 18
  • 27

2 Answers2

11

Try removing

protect_from_forgery

In the application_controller, or

# you can disable csrf protection on controller-by-controller basis:
skip_before_filter :verify_authenticity_token

Facebook uses signed_request that you can decode and use to verify that the request actually comes from facebook, so protect_from_forgery is unnecessary for applications that are accessible through the facebook canvas only.

More here: Canvas Authentication & ActionController::RequestForgeryProtection

azolotov
  • 203
  • 2
  • 5
0

Facebook's omniauth error "the change you wanted was rejected" might appear because of your validations set in the model. I had to refactor my validation for users having one unique email, which wasn't working when a user would try to facebook login with the same email.

Look at your logs. heroku logs -t