Rails facebook app returns 422 “ the change u wanted was rejected” error

不想你离开。 提交于 2019-11-30 15:48:47

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!