Reputation: 159
I want to use Pyfacebook with django 1.5. I follow this tutorial http://agiliq.com/blog/2009/02/how-to-build-a-facebook-app-in-django/ .
When I put: 'facebook.djangofb.FacebookMiddleware'
in MIDDLEWARE_CLASSES
(settings.py).
I have this message: A server error occurred. Please contact the administrator.
Traceback (most recent call last):
File "c:\Python27\lib\wsgiref\handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "c:\Python27\lib\site-packages\django\contrib\staticfiles\handlers.py", l
ine 72, in __call__
return self.application(environ, start_response)
File "c:\Python27\lib\site-packages\django\core\handlers\wsgi.py", line 236, i
n __call__
self.load_middleware()
File "c:\Python27\lib\site-packages\django\core\handlers\base.py", line 59, in
load_middleware
mw_instance = mw_class()
File "build\bdist.win32\egg\facebook\djangofb\__init__.py", line 511, in __ini
t__
self.secret_key = secret_key or settings.FACEBOOK_SECRET_KEY
File "c:\Python27\lib\site-packages\django\conf\__init__.py", line 54, in __ge
tattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'FACEBOOK_SECRET_KEY'
I try to add FACEBOOK_SECRET_KEY in settings.py but i have the same error
Thanks
Upvotes: 0
Views: 101
Reputation: 159
Finaly I add
FACEBOOK_SECRET_KEY = 'xxxxxxxx'
FACEBOOK_API_KEY = 'xx'
in settings.py, it works.
Thanks guys
Upvotes: 0