From fd6a3ab3e4752766fcc977ae1355ec47ac604807 Mon Sep 17 00:00:00 2001 From: Tim Chan Date: Tue, 4 Apr 2017 20:17:13 +1000 Subject: [PATCH] Added 2FA Support Added new function _2FA. Specified that two things that are definitely shown when 2FA is enabled --- fbchat/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbchat/client.py b/fbchat/client.py index 1dbbe4c..dcc40b5 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -231,11 +231,11 @@ class Client(object): r = self._cleanPost(LoginURL, data) # Usually, 'Checkpoint' will refer to 2FA - if 'checkpoint' in r.url: + if 'checkpoint' in r.url and 'Enter Security Code to Continue' in r.text: r = self._2FA(r) # Sometimes Facebook tries to show the user a "Save Device" dialog - if 'save-device' in r.url and 'Enter Security Code to Continue' in r.text: + if 'save-device' in r.url: r = self._cleanGet(SaveDeviceURL) if 'home' in r.url: