gpt4 book ai didi

facebook - 无法在本地主机中开始使用 Google App Engine(runwithfriends 示例)

转载 作者:太空宇宙 更新时间:2023-11-03 12:53:34 24 4
gpt4 key购买 nike

长话短说,我无法从入门示例应用程序 (https://developers.facebook.com/docs/samples/canvas/) 中获取 Runwithfriends 示例应用程序。

在 Google App Engine 中成功获得 hello world 后,我按照 Facebook 示例中的所有说明进行操作。但是,当转到本地主机端口 8080(入门,第 8 步)时,系统提示我出现烦人的“请更新您的安全 Canvas URL”错误;按“继续”除了再次提示我更新我的 URL 之外没有任何作用。

我读到 dev_appserver.py 不支持 SSL,所以我想这就是为什么当我将带有 SSL 的本地主机端口 8080 放在我的 Secure Canvas URL 中时,我收到 ssl_error_rx_record_too_long 错误。所以这是死胡同。

现在,我读到,作为该应用程序的管理员,我的个人安全设置可能搞砸了。所以,我尝试了一个测试用户;使用带有 SSL 的 localhost 作为 Secure Canvas URL 会弹出与以前相同的错误,但将其留空会让我进入 running with friends 主页;就在我要宣布胜利之前,我注意到刷新图标变得疯狂了,所以通过打开 Firebug ,我看到该站点正在疯狂地发送 GET 请求;我打开了查询的标题并得到了这个:

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

只要其他 GET 请求执行其他 GET 请求...那么,您就可以练习了。

也许这是我的错误,我的 conf.py 或 app.yaml 有问题。他们在这里:

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

(我也删除了 secure: 选项,没有用)

现在,也许它真的很傻,比如文件夹结构或应用程序的名称。我希望是这样,我做错了什么,因为我不敢相信入门教程不​​起作用。

更新:似乎 Firefox 犯了“Continue”错误。在 Chrome 上试过,到目前为止一切顺利。我会不断更新以查看进展情况。

最佳答案

Facebook 根据用户帐户中“安全浏览”设置的配置方式来确定是使用您应用的普通 URL 还是安全 URL。听起来您为您的帐户启用了安全浏览,因此 Facebook 正在创建一个应用程序 iframe,它想要导航到该应用程序的安全 URL。在您的用户帐户/隐私设置中禁用安全浏览,您应该能够连接到在本地主机上运行的应用引擎开发服务器。

关于facebook - 无法在本地主机中开始使用 Google App Engine(runwithfriends 示例),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7378710/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com