我正在尝试使用 FB api 获取用户的 facebook 个人资料图片。
我这样做的方法不起作用...首先我提出这样的请求:
String str = facebook.request("me/picture");
Next I create an inputstream from the string str so I can decode it with a bitmapfactory
InputStream is = new ByteArrayInputStream(str.getBytes());
Bitmap bm = BitmapFactory.decodeStream(is);
iv.setImageBitmap(bm);
这从不显示图像!
一直没能找到很多关于这个的信息。任何帮助将不胜感激。
最佳答案
我通过对 url 使用 HTTPGet 来解决这个问题我第一次尝试时遇到了 404 错误,但是当我重写它时它成功了!
关于android - 从 Facebook 获取个人资料图片并将其显示在 Android 应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6349672/