Posts

Showing posts from April, 2014

SharePoint 2013 Unfollow Site using CSOM

The SocialFollowingManager class can be used to follow or unfollow content/site/people/tag.  To get it working with SharePoint App, you'll need to request Core (Social) permission. But that'll only work if you install the app on My Site Host. To get it working for any app, you'll need to request Tenant permission.  However, Tenant Full Control will not work.  You have to request Tenant Manage permission instead. Once you have requested, you can use the follow code to stop follow a site. private void unfollowSite(ClientContext clientContext)         {             Site siteToStopFollow = clientContext.Site;             clientContext.Load(siteToStopFollow, s => s.Url);             clientContext.ExecuteQuery();             SocialFollowingManager followMgr = new SocialFollowingManager(clientContext);             //clientContext.Load(followMgr);             clientContext.ExecuteQuery();             SocialActorInfo actorInfo = new SocialActorInfo();