2014-08-12

python-social-auth 使用上的問題

[facebook]
* 若你在使用 fbconnect 遇到底如底下的錯誤訊息, 這不代表你不能在 facebook app 設定內用 localhost, 而是你某個設定設錯了. 包含開發人員都被使用者唬弄了, 竟在文件內寫不能用 localhost.

HTTPError at /complete/facebook/
400 Client Error: Bad Request
Request Method:    GET

Request URL:    http://localhost:8000/complete/facebook/?redirect_state=FFy3ayBAF5JSGAuvbCSfaTM0WgPTKhi9&code=AQBh59h5DBDjmw1x10sXU21z__UYbdeatP23ElmfKr8B5H1RsdexHqQtE5jU_Wc37MhT_8i_kEFHkvzsl3NyvJTAwRlvznCg9g-HIFy6RwH-5wt83M_mImQ-Z4BfC87yQh66Wc4b5g7XrQUQWa32qZ3p0kmheiv03De1etN-KrNY0g-v82eb-chNULLQn8tKdiHqcR7mmCGtL2-kF5nRMhsUHSBO91HkHdsbnZMASJYaLtESYXFmNMhM-WEmDBkfVmmdRAGj9317uVllsxk0Ps-CnMmdc2Zbtdqdz5Pf3cN8O8hADhwfj6A1bnIvkUXcLGcMoBaiUg0lKkdZyOsM5K2R&state=FFy3ayBAF5JSGAuvbCSfaTM0WgPTKhi9
Django Version:    1.6.5
Exception Type:    HTTPError
Exception Value:   
400 Client Error: Bad Request
Exception Location:    /home/usr/.pyenv/versions/3.4.1/lib/python3.4/site-packages/requests-2.3.0-py3.4.egg/requests/models.py in raise_for_status, line 795


只要將 "App Secret Proof for Server API calls" 關閉即可, 記得 Save

讓我們測測看, 行吧, localhost 只要是在你設的 site url 裡即可

成功即會亮紅燈及訊息 "You are logged in as UserName"





沒有留言:

張貼留言