From fc977c4fa095e1f8b90fbd3e6127864cc5de0d23 Mon Sep 17 00:00:00 2001 From: "Bankde@hotmail.com" Date: Thu, 2 Feb 2017 23:50:41 +0700 Subject: [PATCH] change UTF-8 to global constant --- fbchat/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbchat/client.py b/fbchat/client.py index d00dd09..163560f 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -376,7 +376,7 @@ class Client(object): """ r = self._postFile(UploadURL, image) if isinstance(r._content, str) is False: - r._content = r._content.decode("utf-8") + r._content = r._content.decode(facebookEncoding) # Strip the start and parse out the returned image_id return json.loads(r._content[9:])['payload']['metadata'][0]['image_id']