Get user image from Facebook Graph-API

前端 未结 7 639
长发绾君心
长发绾君心 2020-12-01 03:22

I want to show the users profile picture in a list view. When I try to call the graph-api from android to retrieve the image, I always get the following error.

<         


        
7条回答
  •  生来不讨喜
    2020-12-01 03:39

    private String facebookUser;
    
    
    AccessToken token;
        token = AccessToken.getCurrentAccessToken();
    
        facebookUser = AccessToken.getCurrentAccessToken().getUserId();
        ProfilePictureView profilePictureView;
        profilePictureView = (ProfilePictureView) findViewById(R.id.facebookUser);
    

    profilePictureView.setProfileId(facebookUser);

    xml
    
    

    hope it helps !

提交回复
热议问题