Testing Facebook Integration

Quick Hack:
  1. Edit /etc/hosts to serve your local site from local.www.khanacademy.org
  2. Boom! It works.
More Elaborate Hack:
Last modified: 28 March 2012

This is a draft from my memory.  Please edit if you go through the process.

To test Facebook integration on the dev server:
  1. Setup a test GAE app (e.g. marcia-moo.appspot.com).  This is not strictly necessary by can be used to expose differences between dev and production.
    If you do this, you will need(?) to edit your /etc/hosts to point marcia-moo.appspot.com to
  2. Go to https://developers.facebook.com/apps, and create a Facebook test app (eg. marciums). Note your Facebook app ID and secret (for step 7).
  3. Click the Edit App button.
  4. Scroll down, and find this option. You want to allow people to log into your test GAE app using Facebook!
  5. Click on it, add your test GAE app URL. (csilvers: I think, despite the image below, you need to enter http://marcia-moo.appspot.com:8080.)
    If you did not set up an appspot account in step 1, you can use http://localhost.mit.edu:8080/ as the site URL here.
  6. Don't forget to save!
  7. Create secrets.py in the top-level dir containing:
    facebook_app_id = 'YOUR_ID'
    facebook_app_secret = 'YOUR_SECRET'
  8. Run the dev server.
  9. Visit your dev server via marcia-moo.appspot.com:8080 (or localhost.mit.edu:8080 -- but run host localhost.mit.edu first to make sure it still points to!)
  10. To test on a production equiv server, push to marcia-moo.appspot.com and test against that.