So this has been very annoying I have spent hours trying to get this working. Nothing!!
I have a UIRoot which has buttons and such and also a UITexture this UITexture is for that of the FB ProfilePic. I am using a 3rd party api call instead of using FB sdk. However I still in the logs get the link of the profile pic.(www.....) and if I put that like in my browser it shows me the user who is logging in profile pic. However for some reason it does not show up on my game.
If I add a UITexture to it I can see it before I log into facebook. So before I log in I just have some random texture I added after I log in(Which should show my profile pic) I get nothing its blank.
Maybe my code is bad??
I am using Mobile Social Plugin as well from the store.
SPFacebook.OnUserDataRequestCompleteAction -= UserDataLoaded;
if (result.IsSucceeded)
{
Debug.Log("User Data Loaded!");
IsUserInfoLoaded = true;
SPFacebook.Instance.userInfo.LoadProfileImage(FB_ProfileImageSize.normal);
string FBNametxt = SPFacebook.Instance.userInfo.Name;
UILabel Name = GameObject.Find("FBName").GetComponent<UILabel>();
Name.text = FBNametxt;
//Texture2D FBLoadPicture = SPFacebook.Instance.userInfo.GetProfileImage(FB_ProfileImageSize.large);
UITexture FBLoadTex = FBGetProfile.GetComponent<UITexture>();
FBLoadTex.mainTexture = SPFacebook.Instance.userInfo.GetProfileImage(FB_ProfileImageSize.normal);
// FBLoadTex.MakePixelPerfect();
}
else {
Debug.Log("User data load failed, something was wrong");
}
Please help!!