0
소셜 네트워크와 함께 로그인 기능을 내 장고 프로젝트 중 하나에 추가하려고했습니다. 그것은 페이스 북과 잘 작동하지만 트위터가 고장났습니다./auth/login/twitter에서 TypeError/
트위터를 사용하여 인증하려고하면 다음 오류가 계속 발생합니다.
TypeError at /auth/login/twitter/
sequence item 0: expected str instance, bytes found
Request Method: GET
Request URL: http://127.0.0.1:8000/auth/login/twitter/
Django Version: 1.6.5
Exception Type: TypeError
Exception Value:
sequence item 0: expected str instance, bytes found
Exception Location: C:\Users\cdegen\face\lib\site-packages\social_auth\backends\__init__.py in fetch_response, line 708
Python Executable: C:\Users\cdegen\face\Scripts\python.exe
Python Version: 3.4.1
Python Path:
['C:/Dev/django/face',
'C:\\Program Files (x86)\\JetBrains\\PyCharm 3.4.1\\helpers\\pydev',
'C:\\Dev\\django\\face',
'C:\\Python34',
'C:\\Windows\\system32\\python34.zip',
'C:\\Python34\\DLLs',
'C:\\Python34\\lib',
'C:\\Users\\cdegen\\face',
'C:\\Users\\cdegen\\face\\lib\\site-packages']
Server time: Mon, 23 Jun 2014 08:33:39 -0400
나는 AUTHENTICATION_BACKENDS에 Twitter 백엔드를 추가했습니다. TWITTER_CONSUMER_KEY 및 TWITTER_CONSUMER_SECRET이 설정되어 있습니다.
트위터 API를 호출하는 코드를 게시 할 수 있습니까? 나는'social_auth' 라이브러리를 호출하는 코드를 의미합니다. – anuragal
나는 socialauth_begin 태그를 사용하고 있습니다.
Twitter으로 로그인하십시오.
–