private long SetHashValue(string obj_type, string key, string value, string prop_name, bool isAsync, SetHashValueCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.data.setHashValue" } }; Utilities.AddRequiredParameter(parameterList, "obj_type", obj_type); Utilities.AddRequiredParameter(parameterList, "key", key); Utilities.AddRequiredParameter(parameterList, "value", value); Utilities.AddRequiredParameter(parameterList, "prop_name", prop_name); if (isAsync) { SendRequestAsync<data_setHashValue_response, long>(parameterList, new FacebookCallCompleted<long>(callback), state); return 0; } var response = SendRequest<data_setHashValue_response>(parameterList); return response == null ? 0 : response.TypedValue; }
/// <summary> /// Set a property value by a hash key. /// </summary> /// <example> /// <code> /// /// </code> /// </example> /// <param name="obj_type">Object's type. This is required so that different object types can use the same hash keys for different objects. </param> /// <param name="key">Hash key. This is a unique string chosen by the user that can be used to refer to the object in subsequent function calls. </param> /// <param name="value">Property's value to set. If the hash key exists, this will overwrite any previous value. </param> /// <param name="prop_name">Name of the property to set. </param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>Numeric identifier (fbid) of the object. </returns> public long SetHashValueAsync(string obj_type, string key, string value, string prop_name, SetHashValueCallback callback, Object state) { return SetHashValue(obj_type, key, value, prop_name, true, callback, state); }