private bool PublishUserAction(long template_bundle_id, Dictionary<string, string> template_data, List<long> target_ids, string body_general, PublishedStorySize story_size, bool isAsync, PublishUserActionCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.feed.publishUserAction" } };
            Utilities.AddRequiredParameter(parameterList, "template_bundle_id", template_bundle_id);
            Utilities.AddJSONAssociativeArray(parameterList, "template_data", template_data);
            Utilities.AddList(parameterList, "target_ids", target_ids);
            Utilities.AddOptionalParameter(parameterList, "body_general", body_general);
            Utilities.AddOptionalParameter(parameterList, "story_size", (int)story_size);

            if (isAsync)
            {
                SendRequestAsync<feed_publishUserAction_response, bool>(parameterList, new FacebookCallCompleted<bool>(callback), state, "feed_publishUserAction_response_elt");
                return true;
            }

            var response = SendRequest<feed_publishUserAction_response>(parameterList);
            return response == null ? true : response.feed_publishUserAction_response_elt;
        }
 /// <summary>
 /// Publishes a story on behalf of the user owning the session, using the specified template bundle.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey));
 ///     string oneLineStoryTemplate = "{*actor*} is at {*host*}'s house.";
 ///     string shortStoryTemplateTitle = "{*actor*} has been &lt;a href='http://www.facebook.com/apps/application.php?id=xxx&gt;testing&lt;/a&gt;";
 ///     string shortStoryTemplateBody = "short story body from {*host*}'s house";
 ///     string fullStoryTemplateTitle = "{*actor*} has been &lt;a href='http://www.facebook.com/apps/application.php?id=xxx&gt;testing&lt;/a&gt;";
 ///     string fullStoryTemplateBody = "full story body from {*host*}'s house.";
 ///     List&lt;string&gt; oneLineTemplates = new List&lt;string&gt; { oneLineStoryTemplate };
 ///     feedTemplate shortStoryTemplate = new feedTemplate { PreferredLayout = "1", TemplateBody = shortStoryTemplateBody, TemplateTitle = shortStoryTemplateTitle };
 ///     List&lt;feedTemplate&gt; shortStoryTemplates = new List&lt;feedTemplate&gt; { shortStoryTemplate };
 ///     feedTemplate fullStoryTemplate = new feedTemplate { PreferredLayout = "1", TemplateBody = fullStoryTemplateBody, TemplateTitle = fullStoryTemplateTitle };
 ///     var templateBundleId = api.Feed.RegisterTemplateBundle(oneLineTemplates, shortStoryTemplates, fullStoryTemplate);
 ///     List&lt;long&gt; friendTargets = new List&lt;long&gt; { Constants.Friend_UserId1, Constants.Friend_UserId2 };
 ///     Dictionary&lt;string, string&gt; body_data = new Dictionary&lt;string, string&gt; { { "host", "Run" } };
 ///     api.Feed.PublishUserActionAsync(templateBundleId, body_data, friendTargets, null, Feed.PublishedStorySize.Short, AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(bool 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 or when you registered the bundle using the Feed Template Console.</param>
 /// <param name="template_data">A collection of the values that should be substituted into the templates held by the specified template bundle. For information on forming the template_data object, see Facebook API Documentation.</param>
 /// <param name="target_ids">A list of IDs of friends of the actor, used for stories about a direct action between the actor and the targets of his or her action. This parameter is required if one or more templates in the template bundle makes use of the {*target*} token. It should only include the IDs of friends of the actor, and it should not contain the actor's ID.</param>
 /// <param name="body_general">Additional markup that extends the body of a short story.</param>
 /// <param name="story_size">The size of the Feed story.  The one line story is the default, and users have to opt into using short stories at time of publication or through their privacy settings. Otherwise, if the user has not allowed that particular size to be published through the API, then the story size will be demoted to match the user's preference.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>The function returns true on success or an error response.</returns>
 /// <remarks>
 /// http://wiki.developers.facebook.com/index.php/Feed.publishUserAction
 /// Publishes a story on behalf of the user owning the session, using the specified template bundle. 
 /// An application can publish a maximum of 10 stories per user per day
 /// You can test your Feed templates using the Feed preview console (cf above wiki post).
 /// 
 /// Use JSONHelper.ConvertToJSONArray and/or JSONHelper.ConvertToJSONAssociativeArray to add 'subarrays' in template_data
 /// 
 /// Reserved tokens in template_data: 
 ///     actor
 ///     target
 ///     
 /// Special tokens in template_data:
 ///     images: array of image. image: src, (optional)href
 ///     flash: swfsrc, imgsrc, (optional)expanded_width, (optional)expanded_height
 ///     mp3: src, (optional)title, (optional)artist, (optional)album
 ///     video: video_src, preview_img, (optional)video_title, (optional)video_link, (optional)video_type (default:application/x-shockwave-flash)
 /// </remarks>
 public void PublishUserActionAsync(long template_bundle_id, Dictionary<string, string> template_data, List<long> target_ids, string body_general, PublishedStorySize story_size, PublishUserActionCallback callback, Object state)
 {
     PublishUserAction(template_bundle_id, template_data, target_ids, body_general, story_size, true, callback, state);
 }