我正在使用 Facebook SDK。我想获取当前登录的用户头像。我的代码:
img_url = new URL("https:/graph.facebook.com/" + user.getId() + "/picture?type=large");
InputStream is = img_url.openConnection().getInputStream();
Bitmap avatar;
avatar = BitmapFactory.decodeStream(is);
发现以下异常:
java.net.UnknownHostException: https:/graph.facebook.com/100001119045663/picture?type=large
如何解决这个异常?