Commit b21bca15 authored by Rafael Monnerat's avatar Rafael Monnerat

ERP5Security: Get email from facebook.

parent df5dad64
...@@ -233,10 +233,11 @@ def getFacebookUserEntry(token): ...@@ -233,10 +233,11 @@ def getFacebookUserEntry(token):
'Authentication disabled.') 'Authentication disabled.')
return None return None
timeout = socket.getdefaulttimeout() timeout = socket.getdefaulttimeout()
args = {'fields' : 'id,name,email', }
try: try:
# require really fast interaction # require really fast interaction
socket.setdefaulttimeout(5) socket.setdefaulttimeout(5)
facebook_entry = facebook.GraphAPI(token).get_object("me") facebook_entry = facebook.GraphAPI(token).get_object("me", **args)
finally: finally:
socket.setdefaulttimeout(timeout) 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