Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Upgrade to Twitter Kit 3.0

Eric Frohnhoefer edited this page Dec 7, 2017 · 1 revision

Twitter Kit no longer has a dependency on Fabric. In order to continue using functionality provided by Fabric you should directly include Fabric as a dependency.

Twitter Kit 3.0 includes a number changes that must be taken into consideration when upgrading from 2.x. The sections below outlines these changes.

Binary Distribution

Twitter Kit binaries are no longer distributed through Fabric's maven repository. All binaries are now distributed through Bintray jcenter. Most Android projects should already include jcenter so no changes are required.

Twitter Kit Initialization

Calling Fabric.with(Fabric) is no longer required. Twitter Kit is now initialized by calling Twitter.initialize(TwitterConfig)

Individual kits are now initialized the first time getInstance() method is called on each component. If getInstance() is called before calling Twitter#initialize() an IllegalStateException will be thrown. For more details see Twitter Installation

Request email permission screen removed

The permission screen shown when calling TwitterAuthClient#requestEmail() has been removed. We no longer require 3rd party apps to display the permission screen to request the user’s email. The requestEmail() method will now return the user’s email address without displaying the permission screen.

App card creation removed from composer

Twitter Kit no longer supports programmatic creation of App Cards through the native composer. The native composer will remain and will be expanded to include additional features in the coming months. For more details see Compose Tweets

  • [Removed] The Card class and ComposerActivity.Builder#card method was removed.
  • [Added] The ComposerActivity.Builder#image method was added for attaching an image to the Tweet.
  • [Added] The ComposerActivity.Builder#text method was added for setting default composer text.

Miscellaneous

  • [Changed] Tweet#extendedEtities was changed to Tweet#extendedEntities
  • [Removed] TwitterCore#logIn(Activity, Callback) was removed use TwitterLoginButton or TwitterAuthClient instead.
  • [Removed] TwitterCore#logOut() was removed use TwitterCore.getInstance().getSessionManager().clearActiveSession() instead.

Some classes in io.fabric.sdk.android.* have been moved to com.twitter.sdk.android.core.*. These include:

  • Logger
  • DefaultLogger
  • ExecutorUtils
  • CommonUtils