fix: add timeout parameter(issue #22)
This commit is contained in:
parent
8ed796a2a5
commit
b6d20406f8
2
api.py
2
api.py
@ -10,7 +10,7 @@ CORS(app, resources={r"/.*": {"origins": ["https://course.snsd0805.com"]}})
|
|||||||
def facebookAuth(token):
|
def facebookAuth(token):
|
||||||
url = "https://graph.facebook.com/v9.0/me?access_token={}"
|
url = "https://graph.facebook.com/v9.0/me?access_token={}"
|
||||||
|
|
||||||
response = requests.get(url.format(token))
|
response = requests.get(url.format(token), timeout=3)
|
||||||
data = json.loads(response.text)
|
data = json.loads(response.text)
|
||||||
|
|
||||||
# 若 access code 通過 facebook 驗證
|
# 若 access code 通過 facebook 驗證
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user