Django and Testing Facebook Applications Locally (Port 8000)

Ramblings on startups, NYC, advertising and hacking (mostly Python)

If you’re developing a web application that allows uses to create an account, you’re probably allowing them to do so using Facebook. In order to provide this functionality, Facebook requires you to create an application on their developer portal and set a few basic parameters.

But rather than create one application for both local development and production, my preferred way is to create a second Facebook application specifically for dev. You’ll need to set a few parameters in the application’s config to get things working.

First in the Basic settings set the App Domains along with the Site URL:

Then in the Advanced set the OAuth redirect URIs:

Make sure to include the port you use in the various URLs / URIs. Django’s default is 8000.

And if you keep your application ID / secret as settings in your Django config and use Disqus-style settings, you can simply add…

View original post 16 more words