Hi Experts,
I am facing an issue with following SharePoint 2013 site programmatically. When i was followed a site programmatically, unable to see the posts from followed site in MySite NewsFeed. But i can able to see the followed site in the list of sites i am following. If i did the same manually by clicking on Follow link on right top of the site, i can able to see the posts from the followed site in MySite NewsFeed.
Here is my code. I am doing this activity in an event receiver, while adding an user to the site.
SPSocialFollowingManager manager = new SPSocialFollowingManager(profile);SPSocialActorInfo actorInfo = new SPSocialActorInfo();
actorInfo.ContentUri = new Uri(properties.Web.Url);
actorInfo.AccountName = targetUser.LoginName;
actorInfo.ActorType = SPSocialActorType.Site;
manager.Follow(actorInfo);
Any help would be appreciated. Thanks in advance!
dinesh