-
Notifications
You must be signed in to change notification settings - Fork 342
Upgrade to Twitter Kit 3.0
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 andComposerActivity.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 toTweet#extendedEntities
- [Removed]
TwitterCore#logIn(Activity, Callback)
was removed useTwitterLoginButton
orTwitterAuthClient
instead. - [Removed]
TwitterCore#logOut()
was removed useTwitterCore.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