private data_getAssociations_response GetAssociations(long obj_id1, long obj_id2, bool no_data, bool isAsync, GetAssociationsCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.data.getAssociations" } }; Utilities.AddRequiredParameter(parameterList, "obj_id1", obj_id1); Utilities.AddRequiredParameter(parameterList, "obj_id2", obj_id2); parameterList.Add("no_data", no_data.ToString()); if (isAsync) { SendRequestAsync(parameterList, new FacebookCallCompleted<data_getAssociations_response>(callback), state); return null; } return SendRequest<data_getAssociations_response>(parameterList); }
/// <summary> /// Get all associations between two object identifiers. /// </summary> /// <example> /// <code> /// /// </code> /// </example> /// <param name="obj_id1">Object identifier 1. </param> /// <param name="obj_id2">Object identifier 2. </param> /// <param name="no_data">True if only return object identifiers; false to return data and time as well. </param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>A list of associations, each of which has: /// * name: name of the association to set; /// * id1: object identifier 1; /// * id2: object identifier 2; /// * data: arbitrary information stored with this association; and /// * time: association creation time or a timestamp that was stored with this association. </returns> public data_getAssociations_response GetAssociationsAsync(long obj_id1, long obj_id2, bool no_data, GetAssociationsCallback callback, Object state) { return GetAssociations(obj_id1, obj_id2, no_data, true, callback, state); }