且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Socialauth-机器人获得的OAuth令牌,然后使用账号信息设备

更新时间:2023-11-18 23:53:04

我发现的方式来获得令牌

 字符串标记= mSocialAdapter.getCurrentProvider()getAccessGrant()getKey()。
 

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);
        }
    });

I found out the way to get the token is

String token = mSocialAdapter.getCurrentProvider().getAccessGrant().getKey();