Facebook,Django和Google App Engine [英] Facebook, Django, and 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屋!