如何在facebook SDK 3.0 Android中获取用户的Facebook个人资料图片
问题描述:
我使用的是facebook SDK 3.0,我必须获取用户登录的个人资料。
这是我使用的代码:
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+"/picture" );
profPict=BitmapFactory.decodeStream(image_value.openConnection().getInputStream());
但我没有得到所需的结果。
But I don't get the desired result.
答
您应该更改以下代码:
URL image_value = new URL("http://graph.facebook.com/"+id+"/picture" );
可以在这里找到URL的可能的GET参数:
https://developers.facebook.com/docs/graph-api/reference/user/picture/
Possible GET parameters for the URL can be found here: https://developers.facebook.com/docs/graph-api/reference/user/picture/