我第一次将 Facebook SDK 集成到我的 Android 应用程序中...我在将我的 Facebook 个人资料图片添加到我的应用程序时遇到了一些问题。
这里是onSuccess回调方法:
public void onSuccess(LoginResult loginResult) {
Profile profile = Profile.getCurrentProfile();
if(profile != null) {
Log.v("Logged In Message", profile.getName());
imageView.setImageURI(profile.getProfilePictureUri(50, 50));
}
}
问题是我得到的是正确的名字而不是个人资料图片...
任何帮助将不胜感激
最佳答案
您不需要个人资料图片。您可以通过它的唯一 ID 调用 uid 获取用户个人资料图像,如下所示
http://graph.facebook.com/451985168296158/picture?width=150&height=150
关于java - Android 没有选择 facebook 显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32822589/