private template_bundle GetRegisteredTemplateBundleByID(long template_bundle_id, bool isAsync, GetRegisteredTemplateBundleByIDCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.feed.getRegisteredTemplateBundleByID" } }; Utilities.AddRequiredParameter(parameterList, "template_bundle_id", template_bundle_id); if (isAsync) { SendRequestAsync(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<feed_getRegisteredTemplateBundleByID_response>(callback), state); return null; } return SendRequest<feed_getRegisteredTemplateBundleByID_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); }
/// <summary> /// Retrieves information about a specified template bundle previously registered by the requesting application. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey)); /// api.Feed.GetRegisteredTemplateBundleByIDAsync(long.Parse(Constants.TemplateBundleId), AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(template_bundle result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <param name="template_bundle_id">The template bundle ID used to identify a previously registered template bundle. The ID is the one returned by a previous call to Feed.RegisterTemplateBundle.</param> /// <param name="callback">The AsyncCallback delegate</param> /// <param name="state">An object containing state information for this asynchronous request</param> /// <returns>This method returns a template_bundle containing information on the specified template bundle ID.</returns> public void GetRegisteredTemplateBundleByIDAsync(long template_bundle_id, GetRegisteredTemplateBundleByIDCallback callback, Object state) { GetRegisteredTemplateBundleByID(template_bundle_id, true, callback, state); }