I am trying to embed twitter login in my application. I just came across news that says Fabric was sold to Google. I do not use Fabric in my application. Instead, I use the sdk twitter kernel com.twitter.sdk.android:twitter-core:3.1.1. I am trying to initialize Twitter, but the login button is still inactive using this code:
TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(getString(R.string.twitter_key), getString(R.string.twitter_secret)))
.debug(true)
.build();
Twitter.initialize(config);
I see the following error output in my logcat
E/Twitter: Must initialize Twitter before using getInstance()
How can I solve this error?
source
share