1
votes

I want to test and develop locally, while having the application on the air, and I'd rather not use two separate application id's because this means I have to change the code every time I deploy a new version and then change it back.

I understand that I can change the host file so that localdev.{{my application URL}} would refer to localhost and the URL will be valid, so I won't get the 191 code, but the Google App Engine launcher forces me to use port 8080, and this can't be defined in the host files. If I try to enter localdev.{{my application URL}}:8080 I get the 191 error code again.

Is there any way to use port 80 with the Google App Engine launcher?

Or is there another solution?

UPDATES:

  1. I managed to run locally on port 80 by using the Python file from the Google App Engine directory and not the Google App Engine launcher GUI. However, Facebook doesn't recognize localdev.{{my application URL}} as the URL, and it still gives me the same error code, 191.

  2. Once I changed the host file into {{my application URL}} without the "localdev." it worked, so this must mean the URLs must match exactly, and not just the domain. Is this true? Anyway, it isn't optimal, because it means I have to change the host file all the time, but it's something you can live with...

1
Good questions..It's going to be quite difficult anyway to get realtime updates from facebook to your local machine so I doubt you can do everything if you get it set up.Niklas Rosencrantz
@niklasR that was never the problem.. I can get it to work if I change the app url, but then the online version stops working...Uri
Downvoter please explainUri
You don't need to app IDs - just deploy your test app to a different major version to the one that serves live traffic.Nick Johnson
@nick if it's a different version, i have to access it in a different url, which means i will have problems with facebook authentication, no? also, maybe you should write it in answer to prevent clutter.Uri

1 Answers

2
votes

I have 2 Facebook apps, one with my real URL (for production), and one with http://127.0.0.1/ (for development). Then I have a utility function in my code which checks self.request.host, and selects the appropriate app id and secret.

The reason I use http://127.0.0.1/ and not http://localhost/ or http://localhost:8080/ is that I found only http://127.0.0.1/ would work in Internet Explorer (other browsers seemed fine with those other two URLs, provided they matched the Facebook app).