private void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) { if (e.Uri.PathAndQuery.StartsWith("/connect/login_success.html")) { var sessionString = HttpUtility.ParseQueryString(e.Uri.Query).Get("session"); SessionProperties = JSONHelper.ConvertFromJSONAssoicativeArray(sessionString); DialogResult = true; } }
private void wbFacebookLogin_Navigated(object sender, WebBrowserNavigatedEventArgs e) { if (e.Url.PathAndQuery.StartsWith("/connect/login_success.html")) { DialogResult = DialogResult.OK; var sessionString = HttpUtility.ParseQueryString(e.Url.Query).Get("session"); SessionProperties = JSONHelper.ConvertFromJSONAssoicativeArray(sessionString); } }
protected void Page_Load(object sender, EventArgs e) { //TODO: need to figure out how to trigger this so I can see what the fields param looks like var fields = JSONHelper.ConvertFromJSONAssoicativeArray(Request.Params["fields"]); foreach(KeyValuePair<string,string> field in fields) { var label = field.Key; var elements = field.Value; } }
/// <summary> /// Returns the current allocation limits for your application for the specified integration points. Allocation limits are determined daily. /// </summary> /// <returns>The requested allocation</returns> public Dictionary <string, string> getAppProperties(List <string> applicationProperites) { var parameterList = new Dictionary <string, string> { { "method", "facebook.admin.getAppProperties" } }; _api.AddJSONArray(parameterList, "properties", applicationProperites); string response = _api.SendRequest(parameterList); return(!string.IsNullOrEmpty(response) ? JSONHelper.ConvertFromJSONAssoicativeArray(admin_getAppProperties_response.Parse(response).TypedValue) : null); }
private static void OnGetAppPropertiesCompleted(string result, Object state, FacebookException e) { Object[] stateArray = state != null ? (Object[])state : null; GetAppPropertiesCallback callback = stateArray != null && stateArray.Length > 0 ? (GetAppPropertiesCallback)stateArray[0] : null; var originalState = stateArray != null && stateArray.Length > 1 ? stateArray[1] : null; if (e == null) { if (callback != null) { callback(JSONHelper.ConvertFromJSONAssoicativeArray(result), originalState, e); } } else { if (callback != null) { callback(null, originalState, e); } } }
private Dictionary <string, string> GetAppProperties(List <string> applicationProperties, bool isAsync, GetAppPropertiesCallback callback, Object state) { var parameterList = new Dictionary <string, string> { { "method", "facebook.admin.getAppProperties" } }; Utilities.AddJSONArray(parameterList, "properties", applicationProperties); var newState = new Object[2]; newState[0] = callback; newState[1] = state; if (isAsync) { SendRequestAsync <admin_getAppProperties_response, string>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <string>(OnGetAppPropertiesCompleted), newState); return(null); } var response = SendRequest <admin_getAppProperties_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return(response == null ? null : JSONHelper.ConvertFromJSONAssoicativeArray(response.TypedValue)); }