- Adds support for 280 character limit.
- Adds application only authentication. See Twitter’s documentation for details. To use application only authentication, pass application_only_auth when creating the Api; the bearer token will be automatically retrieved.
- Adds function
- Adds filter_level keyword argument for
- Adds proxies keyword argument for creating an Api instance. Pass a dictionary of proxies for the request to pass through, if not specified allows requests lib to use environmental variables for proxy if any.
- Adds support for quoted_status to the
twitter.twitter_utils.calc_expected_status_length()should now function properly. Previously, URLs would be counted incorrectly. See PR #416
twitter.api.Api.PostUpdates()now passes any keyword arguments on the edge case that only one tweet was actually being posted.
Nothing is being deprecationed this version, however here’s what’s being deprecated as of v. 3.3.0:
twitter.api.Api.UpdateBackgroundImage(). Please make sure that your code does not call this function as it will be returning a hard error. There is no replace function. This was deprecated by Twitter around July 2015.
twitter.api.Api.PostMedia()will be removed. Please use
twitter.api.Api.PostMultipleMedia(). Please use
twitter.api.GetFriends()will no longer accept a cursor or count parameter. Please use
twitter.api.GetFollowers()will no longer accept a cursor or count parameter. Please use
- We’ve added new deprecation warnings, so it’s easier to track when things go away. All of python-twitter’s deprecation warnings will be a subclass of
twitter.error.PythonTwitterDeprecationWarningand will have a version number associated with them such as
twitter.models.Usernow contains a
followingattribute, which describes whether the authenticated user is following the User. PR #351
twitter.models.DirectMessagecontains a full
twitter.models.Userobject for both the
DirectMessage.recipientproperties. PR #384.
- You can now upload Quicktime movies (
*.mov). PR #372.
- If you have a whitelisted app, you can now get the authenticated user’s email address through a call to
twitter.api.Api.VerifyCredentials(). If your app isn’t whitelisted, no error is returned. PR #376.
- Google App Engine support has been reintegrated into the library. Check out PR #383.
- video_info is now available on a twitter.models.Media object, which allows access to video urls/bitrates/etc. in the extended_entities node of a tweet.
twitter.models.Trend‘s volume attribute has been renamed tweet_volume in line with Twitter’s naming convention. This change should allow users to access the number of tweets being tweeted for a given Trend. PR #375
twitter.ratelimit.RateLimitshould behave better now and adds a 1-second padding to requests after sleeping.
twitter.ratelimit.RateLimitnow keeps track of your rate limit status even if you don’t have
Truewhen instatiating the API. If you want to add different behavior on hitting a rate limit, you should be able to now by querying the rate limit object. See PR #370 for the technical details of the change. There should be no difference in behavior for the defaults, but let us know.
twitter.models.Mediaagain contains a
sizesattribute, which was missed back in the Version 3.0 release. PR #360
- The previously bloated
twitter.api.Api.UploadMediaChunked()function has been broken out into three related functions and fixes two an incompatibility with python 2.7. Behavior remains the same, but this should simplify matters. PR #347
- Fix for
twitter.api.Api.PostUpdate()where a passing an integer to the
mediaparameter would cause an iteration error to occur. PR #347
- Fix for 401 errors that were occuring in the Streaming Endpoints. PR #364
twitter.api.Api.PostMediaMetadata()Method allows the posting of alt text (hover text) to a photo on Twitter. Note that it appears that you have to call this method prior to attaching the photo to a status.
- A couple new methods have been added related to showing the connections between two users:
twitter.api.Api.ShowFriendship()shows the connection between two users (i.e., are they following each other?)
twitter.api.Api.IncomingFriendship()shows all of the authenticated user’s pending follower requests (if the user has set their account to private).
twitter.api.Api.OutgoingFriendship()shows the authenticated user’s request to follow other users (i.e. the user has attempted to follow a private account).
- Several methods were added related to muting users:
twitter.api.Api.GetMutes()returns all users the currently authenticated user is muting (as
twitter.api.Api.GetMutesPaged()returns a page of
twitter.api.Api.GetMutesIDs()returns all of the users the currently authenticated user is muting as integers.
twitter.api.Api.GetMutesIDsPaged()returns a single page of the users the currently authenticated user is muting as integers.
twitter.api.Api.GetStatus()Now accepts the keyword argument
include_ext_alt_textwhich will request alt text to be included with the Status object being returned (if available). Defaults to
[model].__repr__()functions have been revised for better Unicode compatibility. If you notice any weirdness, please let us know.
twitter.api.Api()no longer accepts the
shortnerparameter; however, see
examples/shorten_url.pyfor an example of how to use a URL shortener with the API.
twitter.api.Api._EncodePostData()have both been refactored out of the API.
twitter.models.Medianow has an attribute
ext_alt_textfor alt (hover) text for images posted to Twitter.
twitter.models.Statusno longer has the properties
Now. If you require a relative time, we suggest using a third-party library.
- Updated examples, specifically
get_access_token.pyscript to be python3 compatible.
twitter.api.Api.GetStreamFilter()now accepts an optional languages parameter as a list.