Can't get FB profile picture with Firebase

前端 未结 2 1836
无人共我
无人共我 2021-01-17 04:47

I cannot get user\'s Facebook profile picture into my imageView. I am trying to get with Picasso library. Have an idea to solve that? Here is my codes. Thanks in advance!

2条回答
  •  情书的邮戳
    2021-01-17 05:26

    You can get the profile picture in good resolution with this much simple solution:

    If you followed the Firebase samples, inside updateUI method use:

    photoUrl = user.getPhotoUrl(); //here you get the picture
    
    photoUrlstr = photoUrl.toString(); //here you store the link to quality
    
    photoUrlstr = photoUrlstr + "?height=500"; //adjust quality
    
    Glide.with(this).load(photoUrlstr).into(IVperfil); //put it in Imageview
    

    Hope it helps, as this is too much simple code.

提交回复
热议问题