Merge pull request #87 from MKolman/python3-patch
Fixes the issue #60 for Python3
This commit is contained in:
@@ -339,6 +339,8 @@ class Client(object):
|
||||
:param image: a tuple of (file name, data, mime type) to upload to facebook
|
||||
"""
|
||||
r = self._postFile(UploadURL, image)
|
||||
if isinstance(r._content, str) is False:
|
||||
r._content = r._content.decode("utf-8")
|
||||
# Strip the start and parse out the returned image_id
|
||||
return json.loads(r._content[9:])['payload']['metadata'][0]['image_id']
|
||||
|
||||
|
Reference in New Issue
Block a user