コード例 #1
0
        /// <summary>
        /// Share content to LinkedIn.
        /// </summary>
        /// <param name="commentContainingUrl">Comment containing a Url.</param>
        /// <param name="visibilityCode">Code for who to share with.</param>
        /// <returns>Boolean indicating success or failure.</returns>
        public Task <LinkedInShareResponse> ShareActivityAsync(string commentContainingUrl, LinkedInShareVisibility visibilityCode = LinkedInShareVisibility.ConnectionsOnly)
        {
            var shareRequest = new LinkedInShareRequest
            {
                Comment    = commentContainingUrl,
                Visibility = new LinkedInVisibility {
                    Code = LinkedInVisibility.ParseVisibilityEnumToString(visibilityCode)
                }
            };

            return(ShareActivityAsync(shareRequest));
        }
コード例 #2
0
 /// <summary>
 /// Share content to LinkedIn.
 /// </summary>
 /// <param name="shareRequest">Share request.</param>
 /// <returns>Boolean indicating success or failure.</returns>
 public Task <LinkedInShareResponse> ShareActivityAsync(LinkedInShareRequest shareRequest)
 {
     return(Provider.ShareDataAsync <LinkedInShareRequest, LinkedInShareResponse>(shareRequest));
 }