You are correct that you need to add some processing to onActivityResult in order to receive a callback. To pass the result of the activity so that your callback receives it, you can do the following:
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data);
This is essentially what TwitterLoginButton does in its TwitterLoginButton#onActivityResult .
source share