diff --git a/facebook/__init__.py b/facebook/__init__.py index e91c5939..cf8bdafe 100755 --- a/facebook/__init__.py +++ b/facebook/__init__.py @@ -299,7 +299,10 @@ def _add_to_post_args_or_args(arg_name, arg_value): headers = response.headers if "json" in headers["content-type"]: - result = response.json() + try: + result = response.json() + except json.JSONDecodeError: + result = response elif "image/" in headers["content-type"]: mimetype = headers["content-type"] result = {