使用C#将活动发送到Stream.io

时间:2018-07-03 07:41:01

标签: c# stream

我需要发送一个活动(例如,活动,共享活动,评论活动等)到stream.io。有人可以帮我吗?以下是我想发送至stream.io

的LIKE活动的示例
 _activityService.StoreUniqueActivity(new Activity
                {
                    Actor = $"JunaUser:{userId}",
                    Verb = InteractionMetadata.INTERACTION_LIKE,
                    Object = $"{feedItem.ContentType}:{feedItem.Id}",
                    Time = DateTime.UtcNow.ToString("s", System.Globalization.CultureInfo.InvariantCulture)
                });
 if (feedItem.Interactions == null)
                    feedItem.Interactions = new InteractionMetadata
                    {
                        Likes = 0,
                        Shares = 0,
                        Pins = 0
                    };
                feedItem.Interactions.Likes++;
                _feedItemRepository.Upsert(feedItem);

0 个答案:

没有答案