CSRF verification failed, but only with Facebook App

Posted by dkgirl on Stack Overflow See other posts from Stack Overflow or by dkgirl
Published on 2011-01-13T17:27:11Z Indexed on 2011/01/13 17:53 UTC
Read the original article Hit count: 178

Filed under:
|

I am creating a Facebook App using Django.

When I access my webpage directly then it works fine. I have then added this webpage as the Facebook canvas URL, so that users are directed to this page when they go to the App. Now, when I enter the App, I get the "CSRF verification failed" error. I think it's because facebook is doing a POST, but without the CSRF token. However, I cannot control how Facebook redirects to my App.

Anyone know how to deal with this?

This is all my View does:

def frontpage(request): return render_to_response('tube/frontpage.html', {"s": 'hello'})

and frontpage.html just writes "front page!"

© Stack Overflow or respective owner

Related posts about django

Related posts about facebook