Facebook, Django, and Google App Engine

后端 未结 3 1420
萌比男神i
萌比男神i 2020-12-24 15:07

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 mi

3条回答
  •  攒了一身酷
    2020-12-24 15:48

    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().'

    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.

提交回复
热议问题