예제 #1
0
        /// <summary>
        /// Adds the post to the Page MQ163
        /// </summary>
        /// <param name="message">Message of the POst</param>
        /// <param name="picUrl">Picture URL</param>
        /// <param name="taggedUserEmail">emial ID of the User tagged in the Post</param>
        /// <returns></returns>
        public bool AddPost(string message, string picUrl, string taggedUserEmail)
        {
            try
            {
                IFacebookPostData data = new FacebookPostData();
                data.Message = message;
                data.PictureUrl = picUrl;
                data.TaggedUserEmail = taggedUserEmail;

                return page.AddPost(data);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #2
0
        /// <summary>
        /// Creates a post on Facebook page.
        /// </summary>
        /// <param name="message">Message of the POst</param>
        /// <param name="picUrl">Picture URL</param>
        /// <param name="taggedUserEmail">emial ID of the User tagged in the Post</param>
        /// <returns></returns>
        public bool PostPictureMesssage(string message, string picUrl, string taggedUserEmail)
        {
            if (null == picUrl)
                throw new ArgumentNullException("PicUrl", "Cannot post an empty image to Facebook.");
            IFacebookPostData data = new FacebookPostData();
            data.Message = message;
            data.PictureUrl = picUrl;
            data.TaggedUserEmail = taggedUserEmail;

            return page.AddPost(data);
        }