コード例 #1
0
        private void UpdateObject(long obj_id, Dictionary<string, string> properties, bool replace, bool isAsync, UpdateObjectCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.data.updateObject" } };
            Utilities.AddRequiredParameter(parameterList, "obj_id", obj_id);
            Utilities.AddJSONAssociativeArray(parameterList, "properties", properties);
            parameterList.Add("replace", replace.ToString());

            if (isAsync)
            {
                SendRequestAsync<data_updateObject_response, bool>(parameterList, new FacebookCallCompleted<bool>(callback), state);
                return;
            }

            SendRequest(parameterList);
        }
コード例 #2
0
 /// <summary>
 /// Update an object's properties. 
 /// </summary>
 /// <example>
 /// <code>
 /// 
 /// </code>
 /// </example>
 /// <param name="obj_id">Numeric identifier (fbid) of the object to modify. </param>
 /// <param name="properties">Name-value pairs of new properties. </param>
 /// <param name="replace">True if replace all existing properties; false to merge into existing ones.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 public void UpdateObjectAsync(long obj_id, Dictionary<string, string> properties, bool replace, UpdateObjectCallback callback, Object state)
 {
     UpdateObject(obj_id, properties, replace, true, callback, state);
 }