Esempio n. 1
0
    void OnInitComplete()
    {
        FBAppEvents.LaunchEvent();

        if (FB.IsLoggedIn)
        {
            Debug.Log("Already logged in &&&&&&&&&&&&&&&&&&&&&&&&&&&&");
            //OnLoginComplete ();
        }
    }
Esempio n. 2
0
    private void InitCallback()
    {
        Debug.Log("InitCallback");

        FBAppEvents.LaunchEvent();

        if (FB.IsLoggedIn)
        {
            Debug.Log("Already logged in");
            OnLoginComplete();
        }
    }
Esempio n. 3
0
    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();
        }
    }
Esempio n. 4
0
    void OnApplicationPause(bool pauseStatus)
    {
        if (Application.isEditor)
        {
            return;
        }

        if (!pauseStatus)
        {
            if (FB.IsInitialized)
            {
                FBAppEvents.LaunchEvent();
            }
            else
            {
                FB.Init(InitCallback);
            }
        }
    }
Esempio n. 5
0
    // 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);
            }
        }
    }