所以这最近对我来说是个坏消息(不确定这是否与 Facebook 丑闻有关)。但是,现在我无法将从 facebook 登录 api 返回的图像 url 加载到 glide 中。
这是我的代码。
private void useFacebookButton()
{
facebookButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult)
{
Profile profile = Profile.getCurrentProfile();
playerID = profile.getId();
firstName = profile.getFirstName();
lastName = profile.getLastName();
profileImage = profile.getProfilePictureUri(500,500).toString();
Glide.with(getActivity().getBaseContext()).load(profileImage).centerCrop().into(someImageView);
}
@Override
public void onCancel()
{
}
@Override
public void onError(FacebookException error)
{
Log.d(TAG,"facebook error :(");
Log.d(TAG,error.getMessage());
}
});
}
我得到一个返回的网址https://graph.facebook.com/<facebookID>/picture?height=500&width=500&migration_overrides=%7Boctober_2012%3Atrue%7D
但 glide 无法再加载它了。当我将其弹出到 Chrome 中时,它不显示图像,但立即强制下载。当我下载它时,它是正确的图像。这是最近才发生的,上周还运行良好。不知道有没有人找到办法解决这个问题?!?
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)