Android & Facebook SDK : decoding pictures from /me/picture graph call

后端 未结 1 1822
情深已故
情深已故 2021-02-07 09:03

EDIT: Anwser at the end of this post.

I am trying to get a Facebook user\'s profile picture thanks to the inbuilt Facebook SDK\'s function Request()

相关标签:
1条回答
  • 2021-02-07 09:57

    Try this :

    ImageView user_picture;
    userpicture=(ImageView)findViewById(R.id.userpicture);
    URL img_value = null;
    img_value = new URL("http://graph.facebook.com/"+id+"/picture?type=large");
    Bitmap mIcon1 = BitmapFactory.decodeStream(img_value.openConnection().getInputStream());
    userpicture.setImageBitmap(mIcon1);
    

    Where ID is one your profile ID.

    For Further details check this :

    https://developers.facebook.com/docs/graph-api

    0 讨论(0)
提交回复
热议问题