开发者

'WSGIRequest' object has no attribute 'facebook'

开发者 https://www.devze.com 2022-12-15 17:41 出处:网络
Im trying to implement django-socialregistration, with all dependences included, I just fol开发者_如何学运维lowed those instructions. im having this error after authenticating with facebook:

Im trying to implement django-socialregistration, with all dependences included, I just fol开发者_如何学运维lowed those instructions. im having this error after authenticating with facebook:

'WSGIRequest' object has no attribute 'facebook'
C:\Python25\lib\site-packages\socialregistration\views.py in facebook_login
    108. if not request.facebook.check_session(request):

what im missing? some middleware excepted? thx :)


Actually, you need 'socialregistration.middleware.FacebookMiddleware' in MIDDLEWARE_CLASSES

not 'facebook.djangofb..' one.


solved.

adding 'facebook.djangofb.FacebookMiddleware' to MIDDLEWARE_CLASSES in settings.py will attach a facebook object to every incoming request.

0

精彩评论

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

关注公众号