private void OnInitComplete() { this.Status = "Success - Check logk for details"; this.LastResponse = "Success Response: OnInitComplete Called\n"; string logMessage = string.Format( "OnInitCompleteCalled IsLoggedIn='{0}' IsInitialized='{1}'", FB.IsLoggedIn, FB.IsInitialized); LogView.AddLog(logMessage); }
protected override void GetGui() { if (base.Button("Log FB App Event")) { base.Status = "Logged FB.AppEvent"; Dictionary <string, object> parameters = new Dictionary <string, object>(); parameters.Add("fb_description", "Clicked 'Log AppEvent' button"); FB.LogAppEvent("fb_mobile_achievement_unlocked", null, parameters); LogView.AddLog("You may see results showing up at https://www.facebook.com/analytics/" + FB.AppId); } }
private void OnInitComplete() { base.Status = "Success - Check log for details"; base.LastResponse = "Success Response: OnInitComplete Called\n"; string log = string.Format("OnInitCompleteCalled IsLoggedIn='{0}' IsInitialized='{1}'", FB.IsLoggedIn, FB.IsInitialized); LogView.AddLog(log); if (AccessToken.CurrentAccessToken != null) { LogView.AddLog(AccessToken.CurrentAccessToken.ToString()); } }
protected void HandleLimitedLoginResult(IResult result) { if (result == null) { this.LastResponse = "Null Response\n"; LogView.AddLog(this.LastResponse); return; } this.LastResponseTexture = null; // Some platforms return the empty string instead of null. if (!string.IsNullOrEmpty(result.Error)) { this.Status = "Error - Check log for details"; this.LastResponse = "Error Response:\n" + result.Error; } else if (result.Cancelled) { this.Status = "Cancelled - Check log for details"; this.LastResponse = "Cancelled Response:\n" + result.RawResult; } else if (!string.IsNullOrEmpty(result.RawResult)) { this.Status = "Success - Check log for details"; this.LastResponse = "Success Response:\n" + result.RawResult; } else { this.LastResponse = "Empty Response\n"; } String resultSummary = "Limited login results\n\n"; var profile = FB.Mobile.CurrentProfile(); resultSummary += "name: " + profile.Name + "\n"; resultSummary += "id: " + profile.UserID + "\n"; resultSummary += "email: " + profile.Email + "\n"; resultSummary += "pic URL: " + profile.ImageURL + "\n"; resultSummary += "birthday: " + profile.Birthday + "\n"; resultSummary += "age range: " + profile.AgeRange + "\n"; resultSummary += "first name: " + profile.FirstName + "\n"; resultSummary += "middle name: " + profile.MiddleName + "\n"; resultSummary += "last name: " + profile.LastName + "\n"; resultSummary += "friends: " + String.Join(",", profile.FriendIDs) + "\n"; resultSummary += "hometown: " + profile.Hometown?.Name + "\n"; resultSummary += "location: " + profile.Location?.Name + "\n"; resultSummary += "gender: " + profile.Gender + "\n"; LogView.AddLog(resultSummary); }
private void OnInitComplete() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) base.Status = "Success - Check log for details"; base.LastResponse = "Success Response: OnInitComplete Called\n"; string log = $"OnInitCompleteCalled IsLoggedIn='{FB.get_IsLoggedIn()}' IsInitialized='{FB.get_IsInitialized()}'"; LogView.AddLog(log); if ((int)AccessToken.get_CurrentAccessToken() != 0) { LogView.AddLog(AccessToken.get_CurrentAccessToken().ToString()); } }
protected override void GetGui() { if (Button("Log FB App Event")) { base.Status = "Logged FB.AppEvent"; FB.LogAppEvent("fb_mobile_achievement_unlocked", (float?)null, new Dictionary <string, object> { { "fb_description", "Clicked 'Log AppEvent' button" } }); LogView.AddLog("You may see results showing up at https://www.facebook.com/analytics/" + FB.get_AppId()); } }
protected override void GetGui() { if (this.Button("Log FB App Event")) { this.Status = "Logged FB.AppEvent"; FB.LogAppEvent( AppEventName.UnlockedAchievement, null, new Dictionary <string, object>() { { AppEventParameterName.Description, "Clicked 'Log AppEvent' button" } }); LogView.AddLog( "You may see results showing up at https://www.facebook.com/analytics/" + FB.AppId); } }
protected void HandleResult(IResult result) { if (result == null) { this.LastResponse = "Null Response\n"; LogView.AddLog(this.LastResponse); return; } this.LastResponseTexture = null; // Some platforms return the empty string instead of null. if (!string.IsNullOrEmpty(result.Error)) { this.Status = "Error - Check log for details"; this.LastResponse = "Error Response:\n" + result.Error; LogView.AddLog(result.Error); } else if (result.Cancelled) { this.Status = "Cancelled - Check log for details"; this.LastResponse = "Cancelled Response:\n" + result.RawResult; LogView.AddLog(result.RawResult); } else if (!string.IsNullOrEmpty(result.RawResult)) { this.Status = "Success - Check log for details"; this.LastResponse = "Success Response:\n" + result.RawResult; LogView.AddLog(result.RawResult); } else { this.LastResponse = "Empty Response\n"; LogView.AddLog(this.LastResponse); } }
private void OnHideUnity(bool isGameShown) { this.Status = "Success - Check log for details"; this.LastResponse = string.Format("Success Response: OnHideUnity Called {0}\n", isGameShown); LogView.AddLog("Is game shown: " + isGameShown); }
private void OnInitComplete() { base.Status = "Success - Check log for details"; base.LastResponse = "Success Response: OnInitComplete Called\n"; LogView.AddLog(string.Format("OnInitCompleteCalled IsLoggedIn='{0}' IsInitialized='{1}'", FB.IsLoggedIn, FB.IsInitialized)); }
protected void HandleResult(IResult result) { if (result == null) { this.LastResponse = "Null Response\n"; LogView.AddLog(this.LastResponse); print(this.LastResponse); return; } this.LastResponseTexture = null; // Some platforms return the empty string instead of null. if (!string.IsNullOrEmpty(result.Error)) { this.Status = "Error - Check log for details"; this.LastResponse = "Error Response:\n" + result.Error; LogView.AddLog(result.Error); print(result.Error); } else if (result.Cancelled) { this.Status = "Cancelled - Check log for details"; this.LastResponse = "Cancelled Response:\n" + result.RawResult; LogView.AddLog(result.RawResult); print(result.RawResult); } else if (!string.IsNullOrEmpty(result.RawResult)) { this.Status = "Success - Check log for details"; this.LastResponse = "Success Response:\n" + result.RawResult; LogView.AddLog(result.RawResult); //result.ResultDictionary.GetValueOrDefault<IDictionary> ("data"); if (result.ResultDictionary.ContainsKey("like")) { string[] reactStrings = new string[6] { "like", "love", "wow", "haha", "sad", "angry" }; Dictionary <string, long> amounts = new Dictionary <string, long> (); for (int i = 0; i < reactStrings.Length; i++) { IDictionary <string, object> d = (IDictionary <string, object>)result.ResultDictionary [reactStrings[i]]; IDictionary <string, object> d2 = (IDictionary <string, object>)d ["summary"]; amounts[reactStrings[i]] = (long)d2 ["total_count"]; } GameManager.instance.getVotes(amounts); for (int i = 0; i < reactStrings.Length; i++) { print(reactStrings [i] + ": " + amounts [reactStrings[i]]); } //string[] a = new string[d.Count]; //d.CopyTo (a, 0); //Debug.Log (a[0]); } } else { this.LastResponse = "Empty Response\n"; LogView.AddLog(this.LastResponse); } }
private void OnInitComplete() { this.Status = "Success - Check logk for details"; this.LastResponse = "Success Response: OnInitComplete Called\n"; LogView.AddLog("OnInitComplete Called"); }
private void OnHideUnity(bool isGameShown) { base.Status = "Success - Check log for details"; base.LastResponse = $"Success Response: OnHideUnity Called {isGameShown}\n"; LogView.AddLog("Is game shown: " + isGameShown); }