开发者

Unable to get started with Google App Engine in localhost (runwithfriends example)

Long story short, I'm unable to get the Runwithfriends example app from the Gettting Started Sample App (https://developers.facebook.com/docs/samples/canvas/).

After I successfully got a hello world in Google App Engine, I followed all the instruc开发者_开发百科tions from the Facebook Example. However, when going to localhost port 8080 (Getting Started, step 8) I'm prompted with the annoying "Please Update Your Secure Canvas URL" error; pressing Continue doesn't do anything but to prompt me again to update my URL.

I read that the dev_appserver.py doesn't have SSL support, so I guess that's why when I put localhost port 8080 with SSL in my Secure Canvas URL, I get a ssl_error_rx_record_too_long error. So that's a dead end.

Now, I read that maybe my personal security settings as an admin of the app was messing things up. So, I tried with a test user; using localhost with SSL as a Secure Canvas URL pops the same error than before, but leaving it in blank gets me to the running with friends homepage; just before I was going to claim victory, I noticed that the refresh icon was going crazy, so by opening firebug I saw that the site was going GET requests like crazy; I opened the headers of the queries and got this:

Reload the page to get source for: https://apps.facebook.com/facebook-skuiz/

as long with other GET request that does other GET request that... well, you get the drill.

Maybe it's my mistake and I'm doing something wrong with my conf.py or app.yaml. Here they are:

####conf.py
# Facebook Application ID and Secret.
FACEBOOK_APP_ID = 'XXX'
FACEBOOK_APP_SECRET = 'XXX'

# Canvas Page name.
FACEBOOK_CANVAS_NAME = 'facebook-skuiz'

# A random token for use with the Real-time API.
FACEBOOK_REALTIME_VERIFY_TOKEN = 'RANDOM TOKEN'

# The external URL this application is available at where the Real-time API will
# send it's pings.
EXTERNAL_HREF = 'http://facebook-skuiz.appspot.com/'

# Facebook User IDs of admins. The poor mans admin system.
ADMIN_USER_IDS = ['100002926752876']

####app.yaml
application: runwithfriends
version: 1
runtime: python
api_version: 1

handlers:
- url: /(.*\.(html|css|js|gif|jpg|png|ico))
static_files: static/\1
upload: static/.*
expiration: "1d"
secure: always

- url: .*
script: main.py
secure: always

- url: /task/.*
script: main.py
login: admin
secure: always

(I also removed the secure: options, didn't work)

Now, maybe it's something really silly, like the folder structure or the name of the app. I hope that's the case and I'm doing something wrong, cause I can't believe the Getting Started tutorial is not working.

UPDATE: It seems that Firefox was guilty of the "Continue" bug. Tried on Chrome and so far so good. I'll keep updating to see how this goes.


Facebook determines whether or not to use your app's normal or secure URL based on how the the "secure browsing" setting is configured in the user's account. Sounds like you have secure browsing enabled for your account so Facebook is creating an app iframe that wants to navigate to the app's secure URL. Disable secure browsing in your user account / privacy settings and you should be able to connect to the appengine development server running on localhost.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜