Android : How to get larger profile pic from Facebook using FirebaseAuth?

后端 未结 8 642
孤街浪徒
孤街浪徒 2021-01-30 14:25

I am using FirebaseAuth to login user through FB. Here is the code:

private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;
pr         


        
8条回答
  •  萌比男神i
    2021-01-30 15:09

    I use this code in a Second Activity, after having already logged in, for me the Token that is obtained in loginResult.getAccessToken().getToken(); It expires after a while, so researching I found this and it has served me

    final String img = mAuthProvider.imgUsuario().toString(); // is = mAuth.getCurrentUser().getPhotoUrl().toString;
            
    final String newToken = "?height=1000&access_token=" + AccessToken.getCurrentAccessToken().getToken();
            
    Picasso.get().load(img + newToken).into("Image reference");
    

提交回复
热议问题