]> jfr.im git - z_archive/twitter.git/blobdiff - README
update img sending doc
[z_archive/twitter.git] / README
diff --git a/README b/README
index c2e6d789a36d747285e33111c1e84a9be084c83c..ff75ab929d6d6c8e9f67537446cc047cede34dbf 100644 (file)
--- a/README
+++ b/README
@@ -125,12 +125,14 @@ t.statuses.oembed(_id=1234567890, _method='GET')
 
 # Send a tweet with an image included (or set your banner or logo similarily)
 # by just reading your image from the web or a file in a string:
+# Note that the text sent as status along with the picture must be unicode.
+status = u"PTT ★"       # or with python 3: status = "PTT ★"
 with open("example.png", "rb") as imagefile:
-    params = {"media[]": imagefile.read(), "status": "PTT"}
+    params = {"media[]": imagefile.read(), "status": status}
 t.statuses.update_with_media(**params)
 
 # Or by sending a base64 encoded image:
-params = {"media[]": base64_image, "status": "PTT", "_base64": True}
+params = {"media[]": base64_image, "status": status, "_base64": True}
 t.statuses.update_with_media(**params)
 ```