Esempio n. 1
0
        /// <summary>
        /// Send an email to the specified users, who must have added your application. You can only send one email to a user per day. Requires a session key for desktop apps, which may only send emails to the person whose session it is (does not require a session for web apps).
        /// </summary>
        /// <param name="recipients">Comma-separated list of recipient ids. These must be people who have added the application. You can email up to 100 people at a time.</param>
        /// <param name="subject">Subject of the email.</param>
        /// <param name="text">The plain text version of the email content. You must include at least one of either the fbml or text parameters. </param>
        /// <param name="fbml">The FBML version of the email. You must include at least one of either the fbml or text parameters. The fbml parameter is a stripped-down set of FBML that allows only tags that result in text, links and linebreaks.</param>
        /// <returns>This returns a comma-separated list of user ids for whom notifications were successfully sent. We will throw an error if an error occurred.</returns>
        public string sendEmail(string recipients, string subject, string text, string fbml)
        {
            var parameterList = new Dictionary <string, string>
            {
                { "method", "facebook.notifications.sendEmail" },
                { "recipients", recipients },
                { "subject", subject },
                { "text", text }
            };

            _api.AddFBMLParameter(parameterList, "fbml", fbml);

            var response = _api.SendRequest(parameterList);

            return(!string.IsNullOrEmpty(response) ? notifications_sendEmail_response.Parse(response).TypedValue : null);
        }