private void FbLoginCallback(ILoginResult result) { if (result.Cancelled) { if (OnFbLoginCancelled != null) { OnFbLoginCancelled.Invoke(); } return; } if (!string.IsNullOrEmpty(result.Error)) { Debug.LogError("Facebook login error: " + result.Error); if (OnFbLoginError != null) { OnFbLoginError.Invoke(result.Error); } return; } if (OnFbLoggedIn != null) { OnFbLoggedIn.Invoke(); } //Debug.Log("Facebook logged in"); GetFbUserInfo(); }
private void OnFbInitComplete() { Debug.Log("Facebook init complete"); FB.ActivateApp(); if (FB.IsLoggedIn) { GetFbUserInfo(); if (OnFbLoggedIn != null) { OnFbLoggedIn.Invoke(); } } }