0

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

Jeremy
  • 159
  • 4
  • 14
  • 1
    have you `DEBUG = True` in your settings? – Leandro Jun 28 '13 at 11:51
  • This message happened when you have `DEBUG = False`. Set this variable to `True` and check stack trace and console log. I think the djangofb app isn't compatible with django1.5, probably due to {% url %} stuff (just guess, i'm not sure). – Maxime Lorant Jun 28 '13 at 11:53

1 Answers1

0

Finaly I add

FACEBOOK_SECRET_KEY = 'xxxxxxxx'
FACEBOOK_API_KEY = 'xx'

in settings.py, it works.

Thanks guys

Jeremy
  • 159
  • 4
  • 14