从Facebook获取个人资料照片并将其显示在Android App中

问题描述

| 我正在尝试使用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);
这永远不会显示图像! 还没有找到太多有关此的信息。任何帮助,将不胜感激。     

解决方法

        我通过仅使用HTTPGet到url来解决此问题。第一次尝试时,出现404错误,但是当我重写它时,它起作用了!     

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...