public void EventShopFbShareOK() { Debug.Log("EventShopFbShareOK"); ev.EventOnRelease(); if (ev.isCurPrevDist) { audioSource.clip = menuClip; audioSource.Play(); g.isShopFbShare = true; //----------------------------- //here,facebook sharing //----------------------------- #if UNITY_EDITOR if (FB.IsLoggedIn == false) { facebookLogin.StartInfo(); } else { facebookManager.FacebookFeed(); } //StartCoroutine(dbow.PurchaseTran(g.wwwDate, "fbShare")); #elif UNITY_ANDROID if (FB.IsLoggedIn == false) { facebookLogin.StartFacebookLogin(); } else { facebookManager.FacebookFeed(); } #endif } }
void LoginCallback(FBResult result) { Debug.Log("LoginCallback"); Debug.Log(result.Text); var profile = JSON.Parse(result.Text); string is_logged_in = profile["is_logged_in"]; if (is_logged_in == "false") { Debug.Log("Login Error"); //if(g.isHome) homeControl.EventFacebookWarningExit(); //if(g.isMap) mapControl.EventFacebookWarningExit(); return; } else { g.fbId = profile["user_id"]; Debug.Log("g.fbId : " + g.fbId); // facebook my information FB.API("/me?", Facebook.HttpMethod.GET, MyInfoCallback); if (g.isShopFbShare) { facebookManager.FacebookFeed(); g.isShopFbShare = false; } } }