From c24d8826612924bd4ccd94ad466b2a4e45fdaeba Mon Sep 17 00:00:00 2001 From: mssalnikov Date: Tue, 5 Oct 2021 14:50:08 +0300 Subject: [PATCH] add nominal support for GraphAPI up to 12.0 --- facebook/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/facebook/__init__.py b/facebook/__init__.py index e91c5939..dffdd353 100755 --- a/facebook/__init__.py +++ b/facebook/__init__.py @@ -41,7 +41,7 @@ FACEBOOK_GRAPH_URL = "https://graph.facebook.com/" FACEBOOK_WWW_URL = "https://www.facebook.com/" FACEBOOK_OAUTH_DIALOG_PATH = "dialog/oauth?" -VALID_API_VERSIONS = ["3.1", "3.2", "3.3", "4.0", "5.0", "6.0", "7.0", "8.0"] +VALID_API_VERSIONS = ["3.1", "3.2", "3.3", "4.0", "5.0", "6.0", "7.0", "8.0", "8.2", "9.0", "10.0", "11.0", "12.0"] VALID_SEARCH_TYPES = ["place", "placetopic"] @@ -93,7 +93,7 @@ def __init__( self.app_secret_hmac = None if version: - version_regex = re.compile(r"^\d\.\d{1,2}$") + version_regex = re.compile(r"^\d+\.\d{1,2}$") match = version_regex.search(str(version)) if match is not None: if str(version) not in VALID_API_VERSIONS: