Android and Facebook: How to get picture of logged in User

前端 未结 7 1094
攒了一身酷
攒了一身酷 2020-12-08 06:30

I use the official Facebook SDK in my Android Application. After the user logs in, I can get the uid and the name of the facebook user like so:

Facebook mFac         


        
7条回答
  •  孤街浪徒
    2020-12-08 06:47

    Use this, (usuario is a GraphUser):

    ProfilePictureView p;
    p = (ProfilePictureView) rootView.findViewById(R.id.fotoPerfil);
    p.setProfileId(usuario.getId());
    

    and xml markup:

    
    

提交回复
热议问题