Login without Twitter cilent on device not working (Android)


#1

Hello,

I have Android app that used Fabric (Twiiter, Twiiter Core). For login I call:

authClient = new TwitterAuthClient();
authClient.authorize(activity, new Callback<TwitterSession>() {
	@Override
	public void success(Result<TwitterSession> arg0) {
		activeSession = arg0.data;
				
		if (loginCallback != null)
			loginCallback.onLogin(true, false);
	}		
	@Override
	public void failure(TwitterException arg0) {
		activeSession = null;
				
		if (loginCallback != null)
			loginCallback.onLogin(false, false);
	}
});

If I have Twiiter client installed on device, it works good. But when I uninstall native client, app shows me web view for login and after that throws error: TwitterAuthException(Failed to get access token).
I checked Cannonball app - it looks that this app has same issue (I can’t login in it without Twitter client on device too).
May be I need to add anything into Manifest? Anybody, please, help.


#2

Are you calling the TwitterAuthClient’s onActivityResult() method in your Activity’s onActivityResult? That may be the missing link here.


#3

Yes, I am

public void onActivityResult(int requestCode, int resultCode, Intent data){
		if (authClient != null)
			authClient.onActivityResult(requestCode, resultCode, data);
	}

#4