Facebook,Django和Google App Engine [英] Facebook, Django, and Google App Engine

查看:125
本文介绍了Facebook,Django和Google App Engine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试应用引擎补丁(Django for GAE)在Google App Engine上。我想写一个Facebook应用程序。是否可以使用PyFacebook及其中间件?或者还有其他解决方案?

I'm experimenting with app-engine-patch (Django for GAE) on Google App Engine. And I would like to write a Facebook application. Is it possible to use PyFacebook and its middleware? Or is there some other solution?

推荐答案

将Facebook目录从PyFacebook安装目录添加到app-engine-patch应用程序中您将facebook.djangofb.FacebookMiddleware添加到settings.py中的MIDDLEWARE_CLASSES。那么你的视图可以使用'import facebook.djangofb as facebook'和'@ facebook.require_login()''。

Adding the Facebook directory from the PyFacebook install directory to the app-engine-patch application allows you to add 'facebook.djangofb.FacebookMiddleware', to the MIDDLEWARE_CLASSES in settings.py. Then your view can use 'import facebook.djangofb as facebook' and '@facebook.require_login().'

我没有走到尽头,但是当我试图显示'@ facebook.require_login()'之前的视图,我被重定向到Facebook登录。

I haven't gone end to end, but when I tried to display the view preceded by '@facebook.require_login()', I was redirected to the Facebook login.

这篇关于Facebook,Django和Google App Engine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆