开发者

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 thi开发者_JAVA百科s?

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


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜