【发布时间】:2016-02-03 11:21:00
【问题描述】:
我想获取 Facebook 登录用户头像的位图。
我已经在我的应用程序中集成了 facebook 并获得了头像的 url,
但是当我制作它的位图时,位图返回 null。
我的代码:
String fbUID=variable.FacebookUserId;
String img ="http://graph.facebook.com" + File.separator
+ fbUID + File.separator + "picture";
System.out.println("Image for Home" + img);
img_value = new URL(img);
Bitmap mIcon1 = BitmapFactory.decodeStream(img_value.openConnection().getInputStream());
我想将此位图发送到服务器,但是当它返回 null 时,我卡住了。
我也尝试过下载图片,然后发送位图到服务器,但还是不行。
我也参考了下面的链接但是 Steel 没有结果:
Android and Facebook: How to get picture of logged in User
How to get facebook profile picture of user in facebook SDK Android
【问题讨论】: