Friday, June 8, 2012

Testing Django facebook app with https


While working on Facebook app- Shine Ipledge , I had devised my own methods in order to test the app .

I had created two other FB apps for testing , one for local server and other for staging server. Staging was always identical to the main FB app on production server. It had a https server, self signed.

Earlier for locally testing app , I used to run the app using runserver command.
In its settings, it had a website url , which I added in my hosts file, and ran the app straight away
Basic problems were solved, but it lacked where I needed to see how my app looked on a facebooks canvas , with 760 width. !! Now since fb canvas app always runs on a https protocol, I needed to run my local server on https.

Running django local deployment server with https using django runserver command was not possible. All I needed was a server to deploy app on my local machine with https certificate. Initially I tried stunnel, but it didnt work for me.(If you would like try, try this link)

At last I went for Apache. I knew how to set up its configurations . Using openssh I created a self signed certificate, and used it to deploy the fb app.

If you are unclear, please go ahead ask questions in comment.