0
我已經成立了一個Django項目來測試:https://github.com/ryanmark/django_facebook_oauthDjango_facebook引發KeyError異常與Facebook APP_ID
我究竟做了符合規定的教程,但奇怪的是,運行manage.py執行syncdb時,我得到一個關鍵的錯誤:
$ python2.7 manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 11, in <module>
import settings
File "/home/server/webapps/fblogin/myproject/settings.py", line 129, in <module>
FACEBOOK_APP_ID = os.environ['214xxxx(exactly as on fb dev)xxxx390']
File "/usr/local/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: '2145_______390'
(我在這裏填空了鍵),但它是從Facebook開發人員完全複製的完整字符串。
任何想法?