Commit b21bca15 authored by Rafael Monnerat's avatar Rafael Monnerat

ERP5Security: Get email from facebook.

parent df5dad64
......@@ -233,10 +233,11 @@ def getFacebookUserEntry(token):
'Authentication disabled.')
return None
timeout = socket.getdefaulttimeout()
args = {'fields' : 'id,name,email', }
try:
# require really fast interaction
socket.setdefaulttimeout(5)
facebook_entry = facebook.GraphAPI(token).get_object("me")
facebook_entry = facebook.GraphAPI(token).get_object("me", **args)
finally:
socket.setdefaulttimeout(timeout)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment