I'm following this tutorial https://developers.facebook.com/docs/games/unity/unity-tutorial and cannot figure out why this is crashing on iOS. No errors when played in the editor and untested on android. It crashes on this line FB.API(url,Facebook.HttpMethod.GET,result =>
which is copied exactly as the tutorial says.
void FBOnLoggedIn(){
ParseFacebookUtils.LogInAsync(FB.UserId, FB.AccessToken, FB.AccessTokenExpiresAt);
currentUser = ParseUser.CurrentUser;
// Reqest player info and profile picture
FB.API("/me?fields=id,first_name,friends.limit(500).fields(id)", Facebook.HttpMethod.GET, APICallback);
LoadPictureAPI(Util.GetPictureURL("me", 128, 128), MyPictureCallback);
currentUser["FacebookID"] = FB.UserId;
}
void LoadPictureAPI (string url, LoadPictureCallback callback)
{
print ("load pic");
FB.API(url,Facebook.HttpMethod.GET,result =>
{
if (result.Error != null)
{
Util.LogError(result.Error);
return;
}
string imageUrl = Util.DeserializePictureURLString(result.Text);
StartCoroutine(LoadPictureEnumerator(imageUrl,callback));
});
}
So my Apple Dev Cert just expired a few minutes ago, I renewed it, and now no more crash. That is literally all I did, no change in code or anything. I can't imagine an almost expired cert would cause a crash when calling the FB API but apparently it does.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.