How to get facebook profile picture of user in facebook SDK 3.0 Android

前端 未结 8 1117
太阳男子
太阳男子 2020-12-24 15:22

i am using facebook SDK 3.0 i have to get profile picture of user login. Here is the code I use:

URL image_value = new URL(\"http://graph.facebook.com/\"+id         


        
8条回答
  •  一向
    一向 (楼主)
    2020-12-24 15:36

    Once your facebook account is logged into the application, simply do:

    String url = Profile.getCurrentProfile().getProfilePictureUri(x, y).toString();
    

    x and y are width and height.

    See the doc : https://developers.facebook.com/docs/reference/android/current/class/Profile/

提交回复
热议问题