Mig*_*uiz 15 facebook facebook-graph-api
我使用网址https://graph.facebook.com/{app_user_id}/picture?width=120&height=120
在我的应用上显示用户图片,但从今天早上起,它已停止在移动设备上工作.
现在,相同的网址重定向到https://lookaside.facebook.com/platform/profilepic/?asid={app_user_id}&height=120&width=120
.此网址适用于桌面网络,但在移动设备上,它会再次重定向到https://m.facebook.com/platform/profilepic/?asid={app_user_id}&height=120&width=120
移动网络,并拒绝输出图像.如果我尝试在地址栏中加载它,则会下载而不是显示.
我已经在Facebook图表api上搜索了关于此的任何更改,但没有找到任何内容.任何提示要解决这个问题?谢谢.
这似乎是一个错误.今天早上开始发生在我的应用程序中.至今还没有修复.
在Facebook for Developers上提交的一些错误报告:
我今天遇到了同样的问题,我找到了解决方案,它对我有用.
登录后,我们得到以下个人资料图片网址
http://graph.facebook.com/11111111111/picture?type=large&height=320&width=420
Run Code Online (Sandbox Code Playgroud)
11111111111是您的社交ID/facebook ID
现在我们需要更改此URL才能显示图像,这里是代码.
try {
profile_pic = new URL("https://graph.facebook.com/" + id + "/picture?type=large");
Log.i("profile_pic", profile_pic + "");
Picasso.with(getContext()).
load(profile_pic.toString())
.placeholder(R.drawable.img)
.into(imageviewId);
}
catch (MalformedURLException e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
id是你的socialid/facebook id
简而言之,我们只需要从url中删除&height = 320&width = 420.
你可以比较两个网址:
http://graph.facebook.com/11111111111/picture?type=large&height=320&width=420
https://graph.facebook.com/11111111111/picture?type=large
Run Code Online (Sandbox Code Playgroud)
是的,你需要改变HTTP到HTTPS以及
归档时间: |
|
查看次数: |
6897 次 |
最近记录: |