@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getIntent().getData() != null) {
Provider provider = loadSelectedProvider();
OAuth3LeggedScheme.Token requestToken = loadRequestToken();
if (provider != null && requestToken != null) {
try {
String[] credentials = providerCredentials.get(provider.getName());
OAuth3LeggedScheme authScheme = new OAuth3LeggedScheme(provider,
credentials[0], credentials[1]);
authScheme.setRequestToken(requestToken);
authScheme.requestAccessToken(requestToken.token);
persistAccessToken(authScheme.getAccessToken());