简体   繁体   中英

Rails facebook Iframe app error: InvalidAuthenticityToken

I get this error when I acccess my facebook iframe app:

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

Heroku logs:

2011-06-05T08:30:41+00:00 app[web.1]: Started POST "/facebook/" for xxxx
03 at 2011-06-05 10:30:41 +0200
2011-06-05T08:30:41+00:00 heroku[router]: POST www.vinderhimlen.dk/facebook/ dyn
o=web.1 queue=0 wait=0ms service=39ms bytes=711
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]: ActionController::InvalidAuthenticityToken
 (ActionController::InvalidAuthenticityToken):
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:41+00:00 app[web.1]:
2011-06-05T08:30:45+00:00 heroku[web.1]: Stopping process with SIGTERM
2011-06-05T08:30:45+00:00 app[web.1]: >> Stopping ...
2011-06-05T08:30:45+00:00 heroku[web.1]: Process exited

Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master)
$

By default, Rails requires a token to be included as a hidden field with every POST.

This protects your app from Cross-Site Request Forgery.

See the Rails Request Forgery Protection documentation.

skip_before_filter:verify_authenticity_token may be useful for further debugging.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM