Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locally testing a Facebook app via OAuth login on Google app engine

I am using dev_appserver.py to test my app locally. However, I can't login to it because Facebook restricts logins to only the app URL I provide in the Facebook setup, which is myappname.appspot.com.

It doesn't look like there's a way to authorize secondary referrers for Facebook apps. Are there any good workarounds for this?

My app relies almost entirely on Facebook data, so faking a login won't get me very far.

like image 623
ty. Avatar asked Mar 19 '11 00:03

ty.


1 Answers

option 1) Edit your hosts file so that your registered domain points to 127.0.0.1

option 2) Register a secondary app ID on facebook that you will use for development purposes. Register this with the URL of localhost. Then switch which app ID you use prior to deployment to your production server.

Given how common this problem is, it's shocking to me that the Facebook documentation isn't more explicit about the workaround. Other OAuth providers aren't any better though...

like image 191
Robert Levy Avatar answered Nov 07 '22 05:11

Robert Levy