Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

MySite NewsFeed is not showing the feeds from a SharePoint 2013 site which followed programmatically

$
0
0

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


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>