Store Facebook credentials in Android for Google Smart Lock Password

Store Facebook credentials in Google Smart Lock password

I managed to save the basic user credentials and password in Smart Lock Password. There is a lot of documentation and examples for Google credentials:

GoogleSignInAccount gsa = signInResult.getSignInAccount();
Credential credential = new Credential.Builder(gsa.getEmail())
        .setAccountType(IdentityProviders.GOOGLE)
        .setName(gsa.getDisplayName())
        .setProfilePictureUri(gsa.getPhotoUrl())
        .build();

But so far I have not been able to save the credentials on Facebook. It should be something similar. But what exactly? Or is it something completely different or not supported?

Credential credential = new Credential.Builder(<what goes here?!>)
        .setAccountType(IdentityProviders.FACEBOOK)
        .setName(<and here?>)
        .setProfilePictureUri(<is this necessary?>)
        .build();
+4
source share
1 answer

I was able to get what, in my opinion, is the working version of Smart Lock, which allows me to save login credentials for Facebook.

API FB . , , , . :

    Credential credential = new Credential.Builder(user.getEmail())
       .setAccountType(IdentityProviders.FACEBOOK)
       .setName(user.getName())
       .build();

API Facebook, , SDK Facebook.

FB passwords.google.com. " Facebook".

0

Source: https://habr.com/ru/post/1621266/


All Articles