2011-09-28 66 views
2

我收到了兩個類似的FB應用程序。一個人工作,副本給'壞請求'。我收到了:錯誤的請求

Environment: 


Request Method: GET 
Request URL: http://doctorme.herokuapp.com/?code=AQAAWe0A6wnm24YuT066ILJMInzeJ0YPANpzb_bnS5jJRCg62KAxmTmD1m56QFVxW5DRRWRgMN8lWFNTucZpQXPHPJstRiFVPE7IfIntei-qMkNlz30SICWvfPDlfvw1g0NPBrqvkPqjZtjAF4xtR8j-WpK89ZAiMARzr3i9_GwsK6Ruhk6Zg2hqYy-qgP4CWY0 

Django Version: 1.3.1 
Python Version: 2.7.1 
Installed Applications: 
['django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.sites', 
'django.contrib.admin', 
'django.contrib.admindocs'] 
Installed Middleware: 
('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware') 


Traceback: 
File "/app/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 
    111.       response = callback(request, *callback_args, **callback_kwargs) 
File "/app/doctorme/views.py" in home 
    14.   access_token = fbapi_auth(request)[0] 
File "/app/doctorme/fbapi.py" in fbapi_auth 
    60.        encode_func=simple_dict_serialisation) 
File "/app/doctorme/fbapi.py" in fbapi_get_string 
    48.  result = urllib2.urlopen(url).read() 
File "/usr/local/lib/python2.7/urllib2.py" in urlopen 
    126.  return _opener.open(url, data, timeout) 
File "/usr/local/lib/python2.7/urllib2.py" in open 
    398.    response = meth(req, response) 
File "/usr/local/lib/python2.7/urllib2.py" in http_response 
    511.     'http', request, response, code, msg, hdrs) 
File "/usr/local/lib/python2.7/urllib2.py" in error 
    436.    return self._call_chain(*args) 
File "/usr/local/lib/python2.7/urllib2.py" in _call_chain 
    370.    result = func(*args) 
File "/usr/local/lib/python2.7/urllib2.py" in http_error_default 
    519.   raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 

Exception Type: HTTPError at/
Exception Value: HTTP Error 400: Bad Request 

回答

0

檢查您在FB應用程序和您的應用程序中使用了正確的配置。

給予HTTPs一個鏡頭(即使它看起來不是HTTPs的情況下...)與Heroku它只是一個10secs的問題,使它啓用:)

相關問題