Authenticating with Android SDK -- AuthListener not receiving callback

oauth

#1

When I attempt to authenticate for the first time, Twitter will open and I’m able to agree to authenticate my app. But once closed, the AuthListener is NOT fired and I’m unable to further use the Twitter API (I just want to use TweetComposer to share things).

Below is how I’m authenticating:

     LISessionManager.getInstance(getApplicationContext()).init(this, buildScope(), new AuthListener() {
        @Override
        public void onAuthSuccess() {
            // Authentication was successful.  You can now do
            // other calls with the SDK.
            Toast.makeText(getApplicationContext(), "Success!", Toast.LENGTH_LONG).show();
            Toast.makeText(getApplicationContext(), LISessionManager.getInstance(getApplicationContext()).getSession().getAccessToken().getValue(), Toast.LENGTH_LONG).show();
        }

        @Override
        public void onAuthError(LIAuthError error) {
            // Handle authentication errors
            Toast.makeText(getApplicationContext(), error.toString(), Toast.LENGTH_LONG ).show();
        }
    }, true);
}

// Build the list of member permissions our LinkedIn session requires
private static Scope buildScope() {
    return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE);
}

Any help on this is much appreciated. I’ve been banging my head against the wall on this for a coupled days now.

EDIT: To be clear, onAuthError() is not being fired either.


#2

Are you using Twitter Kit in Fabric? the code you’ve pasted appears to be related to LinkedIn?