twython icon indicating copy to clipboard operation
twython copied to clipboard

Handle upcoming changes to Tweets

Open philgyford opened this issue 9 years ago • 1 comments

There are some changes happening to Tweets at some point, as outlined in this post.

I can see a couple of things that need doing:

  • Add the new error code 386 ("The Tweet exceeds the number of allowed attachment types") to TWITTER_HTTP_STATUS_CODE in twython/endpoints.py
  • Make Twython.html_for_tweet() handle tweets that have no text field but do have a full_text field. Maybe just a quick check as to which field is present, and use that? I'm not sure if the method should do anything more clever.

I've read that post a couple of times now, and I don't think there's anything more Twython needs to do to cope, but I may well be wrong. A second opinion would be good! (fwiw, requesting tweets from the API with the new tweet_mode='extended' works, returning the new format of JSON.)

philgyford avatar Jun 13 '16 16:06 philgyford

FYI, submitted PR #429 to add proper support in Twython.html_for_tweet() for extended tweets. Comments are welcomed!

ping avatar Sep 20 '16 09:09 ping