private async Task CreateLike(UserAuthorization user, string likeUrn, string actorUrn) { try { var createLikeRequest = new CreateLikeRequest { Actor = actorUrn, Object = likeUrn }; var like = await api.SocialActions.CreateLikeAsync(user, likeUrn, createLikeRequest); await api.SocialActions.DeleteLikeAsync(user, likeUrn, actorUrn, actorUrn); } catch (Exception) { } }
private async Task CreateLike(UserAuthorization user) { try { var postUrn = "urn:li:comment:(urn:li:activity:6604993552747380736,6605016542239301632)"; var actorUrn = "urn:li:organization:18568129"; var createLikeRequest = new CreateLikeRequest { Actor = actorUrn, Object = postUrn }; var like = await this.api.SocialActions.CreateLikeAsync(user, postUrn, createLikeRequest); await this.api.SocialActions.DeleteLikeAsync(user, postUrn, actorUrn, actorUrn); } catch (Exception ex) { } }