private data_getObject_response GetObject(long obj_id, List<string> prop_names, bool isAsync, GetObjectCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.data.getObject" } }; Utilities.AddRequiredParameter(parameterList, "obj_id", obj_id); Utilities.AddList(parameterList, "prop_names", prop_names); if (isAsync) { SendRequestAsync(parameterList, new FacebookCallCompleted<data_getObject_response>(callback), state); return null; } return SendRequest<data_getObject_response>(parameterList); }
/// <summary> /// Get an object's properties. /// </summary> /// <example> /// <code> /// /// </code> /// </example> /// <param name="obj_id">Numeric identifier (fbid) of the object to query.</param> /// <param name="prop_names">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>An array of the values only (not the names) of specified properties of the object. </returns> /// <remarks>The second (index 1) is the object id (fbid); after that they will be properties you added yourself.</remarks> public data_getObject_response GetObjectAsync(long obj_id, List<string> prop_names, GetObjectCallback callback, Object state) { return GetObject(obj_id, prop_names, true, callback, state); }