我的代码:
final String url = "https://graph.microsoft.com/beta/me/photo/$value";
final String accessToken = mAuthResult.getAccessToken();
final ImageRequest imageRequest = new ImageRequest(url, response -> {
// success
}, 300, 300, ImageView.ScaleType.CENTER_CROP, Bitmap.Config.RGB_565, error-> {
// failed
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("Authorization", "BEARER " + accessToken);
return headers;
}
};
queue.add(imageRequest);
响应:
D / skia:-无法通过消息创建图像解码器 “未实现”
问题:
如何从Microsoft获取用户的照片?
https://docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0)