HTTP 200 testing Django applications with Facebook

Grab the feed

School is a twelve-year jail sentence where bad habits are the only curriculum truly learned.

John Taylor Gatto

Recent comments

I've been writing a simple Django application for Facebook these days. I'm really enjoying how clean Django's code is and its very well thought classes and methods. It really makes web development faster.

I started with some simple HTML running locally on Django's development server and then updated my templates to output FBML based on the value of a variable I called IN_FACEBOOK and inserted into my settings.py.

After adding PyFacebook to talk to Facebook's API from Python I configured my new application according to Facebook's instructions.

Finally I changed my router's port forwarding settings to allow Facebook to see my home server's public IP, which is dynamic and provided by my ISP.

Everything ran ok up to this point and then I started noticing that after each change on my application's code Facebook returned a blank page with an HTTP 200 message.

It seemed like a connection issue and I moved the application to my real server, which has a fixed public IP, but the problem persisted. After every code change Facebook returned a blank page with the HTTP 200 message. I needed to refresh the browser three or more times to get my application loading.

My application is still on development but even so I decided to replace Django's server with an Apache and mod_python setup.

Presto¡ That was the source of the problem. It seems Django's development server response time is too high for Facebook.

Keep your comments relevant, written in good English and don't spam. Let's create useful and valuable discussions. Markdown is welcome.

Add your comment