private string GetObjectProperty(long obj_id, string prop_name, bool isAsync, GetObjectPropertyCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.data.getObjectProperty" } }; Utilities.AddRequiredParameter(parameterList, "obj_id", obj_id); Utilities.AddRequiredParameter(parameterList, "prop_name", prop_name); if (isAsync) { SendRequestAsync<data_getObjectProperty_response, string>(parameterList, new FacebookCallCompleted<string>(callback), state); return null; } var response = SendRequest<data_getObjectProperty_response>(parameterList); return response == null ? null : response.TypedValue; }
/// <summary> /// Get properties of multiple objects. /// </summary> /// <example> /// <code> /// /// </code> /// </example> /// <param name="obj_id">A list of 64-bit numeric identifiers (fbids) of objects to query. For example: [fbid1, fbid2] </param> /// <param name="prop_name">Optional - A list of property names (strings) to selectively query a subset of object properties. If not specified, all properties will be returned. </param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>list of name-value pairs. </returns> public string GetObjectPropertyAsync(long obj_id, string prop_name, GetObjectPropertyCallback callback, Object state) { return GetObjectProperty(obj_id, prop_name, true, callback, state); }