Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 45b2e6f

Browse files
committed
Changes to PostMedia
PostMedia's parameters need to be strings for the requests library. I have made it so the user can enter in either a int or string for the "in_reply_to_status_id" without throwing errors by type casting the variable.
1 parent 788f032 commit 45b2e6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

twitter/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ def PostMedia(self, status, media, possibly_sensitive=None,
923923
if possibly_sensitive:
924924
data['possibly_sensitive'] = 'true'
925925
if in_reply_to_status_id:
926-
data['in_reply_to_status_id'] = in_reply_to_status_id
926+
data['in_reply_to_status_id'] = str(in_reply_to_status_id)
927927
if latitude is not None and longitude is not None:
928928
data['lat'] = str(latitude)
929929
data['long'] = str(longitude)

0 commit comments

Comments
 (0)