private IEnumerator OnInit(
            InitDelegate onInitComplete,
            string appId,
            bool cookie               = false,
            bool logging              = true,
            bool status               = true,
            bool xfbml                = false,
            string channelUrl         = "",
            string authResponse       = null,
            bool frictionlessRequests = false,
            Facebook.HideUnityDelegate hideUnityDelegate = null)
        {
            // wait until the native dialogs are loaded
            while (fb == null)
            {
                yield return(null);
            }
            fb.Init(onInitComplete, appId, cookie, logging, status, xfbml, channelUrl, authResponse, frictionlessRequests, hideUnityDelegate);

            this.isInitialized = true;
            if (onInitComplete != null)
            {
                onInitComplete();
            }
        }
 public override void Init(
     InitDelegate onInitComplete,
     string appId,
     bool cookie               = false,
     bool logging              = true,
     bool status               = true,
     bool xfbml                = false,
     string channelUrl         = "",
     string authResponse       = null,
     bool frictionlessRequests = false,
     Facebook.HideUnityDelegate hideUnityDelegate = null)
 {
     StartCoroutine(OnInit(onInitComplete, appId, cookie, logging, status, xfbml, channelUrl, authResponse, frictionlessRequests, hideUnityDelegate));
 }
 public override void Init(
     InitDelegate onInitComplete,
     string appId,
     bool cookie               = false,
     bool logging              = true,
     bool status               = true,
     bool xfbml                = false,
     string channelUrl         = "",
     string authResponse       = null,
     bool frictionlessRequests = false,
     Facebook.HideUnityDelegate hideUnityDelegate = null)
 {
     iosInit(appId, cookie, logging, status, frictionlessRequests, FBSettings.IosURLSuffix);
     externalInitDelegate = onInitComplete;
 }
Example #4
0
        public override void Init(
            InitDelegate onInitComplete,
            string appId,
            bool cookie               = false,
            bool logging              = true,
            bool status               = true,
            bool xfbml                = false,
            string channelUrl         = "",
            string authResponse       = null,
            bool frictionlessRequests = false,
            Facebook.HideUnityDelegate hideUnityDelegate = null)
        {
            //Init Facebook. This will load in UserID and AccessToken if made a previous login.
            FacebookWP8.Init(appId);


            if (FacebookWP8.IsLoggedIn)
            {
                //If Logged in (UserID and Token was saved and valid then set login = true
                //Dll checks if the token if valid.
                isLoggedIn  = FacebookWP8.IsLoggedIn; //Only true if token and User are not blank.
                accessToken = FacebookWP8.AccessToken;
                userId      = FacebookWP8.UserID;
            }
            else if (FacebookWP8.AccessToken.Length > 0)
            {
                //If Only access token is there, because login with DLL only produces the Acess Token,
                //Then Complete Login
                isLoggedIn  = false;
                accessToken = FacebookWP8.AccessToken;
                StartCoroutine(LoginComplete());
            }
            else
            {
                //If AccessToken and User are blank in FacebookWP8 class then login if false.
                isLoggedIn = false;
            }

            if (onInitComplete != null)
            {
                onInitComplete();
            }
        }