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

1

9

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);
        }
    });
Assr answered 17/1, 2013 at 1:27 Comment(2)
okay I found a way to get the token: String token = mSocialAdapter.getCurrentProvider().getAccessGrant().getKey();Assr
Could you answer your own question? It is not obvious that the answer is hidden inside this comment. Thank youEastereasterday
A
13

I found out the way to get the token is

String token = mSocialAdapter.getCurrentProvider().getAccessGrant().getKey();
Assr answered 23/3, 2014 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.