Rails facebook app返回422“你想要的改变被拒绝“错误 [英] Rails facebook app returns 422 " the change u wanted was rejected" error
问题描述
我的Facebook今天刚获得批准。然而,当我点击转到应用程序时,它返回Rail 422你想要的更改被拒绝错误我将我的画布URL设置到我的网站的URL,我正在使用Omniauth,所以我只是想知道我错过了什么
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.
推荐答案
尝试删除
protect_from_forgery
在application_controller中,或
In the application_controller, or
# you can disable csrf protection on controller-by-controller basis:
skip_before_filter :verify_authenticity_token
Facebook使用signed_request,您可以解码并使用它来确认请求实际来自Facebook,所以protect_from_forgery对于只能通过Facebook画布访问的应用程序是不必要的。
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.
更多信息:帆布验证& ActionController :: RequestForgeryProtection
More here: Canvas Authentication & ActionController::RequestForgeryProtection
这篇关于Rails facebook app返回422“你想要的改变被拒绝“错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!