1

I have a problem on my server. I use Django rest framework on a linux server. And I need to check the Facebook token recieved from the client (a mobile app).

Sometimes, not all the time, i recieve this bad response : ('bad handshake: SysCallError(0, None)',)

My code is :

try:
    requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'DES-CBC3-SHA'
    response = requests.get('https://graph.facebook.com/me?fields=first_name,last_name,gender,email,verified&access_token=' + token, verify=False)

except Exception as e:
    logger.error(str(e))
    return Response(str(e), status=status.HTTP_403_FORBIDDEN)

Anyone know what i need to do to resolve this error?

Thanks a lot for your answers.

Banana
  • 91
  • 2
  • 11
  • 1
    I would say this has nothing to do with Django. Did you see this thread and tried the suggestions in comments? https://stackoverflow.com/questions/40004748/how-to-fix-bad-handshake-sslerrors-when-utilizing-python-requests – petr Dec 15 '17 at 15:37
  • Yeah, i think there nothing to do with Django, that was to introduce the problem. I already have installed the package. I've tried to install it again. It seems it fix the problem. Thanks for your link and your time. – Banana Dec 15 '17 at 16:50

0 Answers0