Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Socialauth-android get oAuth-token and use account information on device

I am using the socialauth-android library to log users in with Facebook, Twitter and LinkedIn.

So far I couldn't find a way to get the oAuth-token back. Is there a way to access it without reimplementing parts of the library?

Also, when I want to sign in using socialauth (see code below) I have to type in the username and the password manually although I have all accounts already set up with the device. Can you tell socialauth to use this accounts?

buttonFacebook.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            mSocialAdapter.authorize(ActivityLogin.this, Provider.FACEBOOK);
        }
    });
like image 324
Till S Avatar asked Jan 17 '13 01:01

Till S


1 Answers

I found out the way to get the token is

String token = mSocialAdapter.getCurrentProvider().getAccessGrant().getKey();
like image 147
Till S Avatar answered Oct 27 '22 22:10

Till S