void OnInitComplete() { FBAppEvents.LaunchEvent(); if (FB.IsLoggedIn) { Debug.Log("Already logged in &&&&&&&&&&&&&&&&&&&&&&&&&&&&"); //OnLoginComplete (); } }
private void InitCallback() { Debug.Log("InitCallback"); FBAppEvents.LaunchEvent(); if (FB.IsLoggedIn) { Debug.Log("Already logged in"); OnLoginComplete(); } }
private void InitCallback() { Debug.Log("InitCallback"); // App Launch events should be logged on app launch & app resume // See more: https://developers.facebook.com/docs/app-events/unity#quickstart FBAppEvents.LaunchEvent(); if (FB.IsLoggedIn) { Debug.Log("Already logged in"); OnLoginComplete(); } }
void OnApplicationPause(bool pauseStatus) { if (Application.isEditor) { return; } if (!pauseStatus) { if (FB.IsInitialized) { FBAppEvents.LaunchEvent(); } else { FB.Init(InitCallback); } } }
// OnApplicationPause(false) is called when app is resumed from the background void OnApplicationPause(bool pauseStatus) { // Do not do anything in the Unity Editor if (Application.isEditor) { return; } // Check the pauseStatus for an app resume if (!pauseStatus) { if (FB.IsInitialized) { // App Launch events should be logged on app launch & app resume // See more: https://developers.facebook.com/docs/app-events/unity#quickstart FBAppEvents.LaunchEvent(); } else { FB.Init(InitCallback); } } }