Recently for my new game i am implementing the Facebook Login. Currently when i login i show the Profile image to the user.
void UpdateUserNameAndImage(bool isLoggedIn) {
if (isLoggedIn) {
FB.API ("/me?fields=first_name", HttpMethod.GET, UpdateUserName);
FB.API ("/me/picture?type=square&height=50&width=50", HttpMethod.GET, UpdateProfileImage);
} else {
}
}
private void UpdateProfileImage(IGraphResult result) {
if(result.Texture != null) {
facebookLogin_button.GetComponentInChildren<RawImage> ().texture = result.Texture;
}
}
The code is normal. I call it after there is successful login from the user.
The problem: Well the problem is that there should be internet for the profile picture to appear. There must be a call made to the graph api for the image everytime.
I want to show the profile image of the user when there is no internet too.
So i am looking for some kind of cache that Facebook SDK use for the logged in profile that i am not aware of.
UpdateProfileImage
callback? \$\endgroup\$ – DMGregory♦ Jul 2 '17 at 16:12