views:

37

answers:

2

Hi, is it possible to programatically select/deselect activities I am following on the news feed preferences page under MySites? I want to be able switch on/off notifications for both custom events and those provided by Sharepoint 2010 out-of-the-box.

+1  A: 

You can use the UserProfileManager class to get a specific UserProfile and do this.

Doug Stalter
Hi Doug, do you have some code demonstrating this? I tried to explore the UserProfile class but didn't find any useful property or method
Anand
Use UserProfile["SPS-Interests"] to access interests.
Doug Stalter
Also, if you want to change the settings for the 'Activities I Am Following' section of your profile, check http://www.sharepointoverflow.com/questions/5730/disable-a-specific-news-feed-activity-using-the-client-object-model
Doug Stalter
Thanks for showing the ways Doug, I will continue looking further further.
Anand
+1  A: 

Hi Anand, you may want to check "Using Activity Feeds with Object Model" topic under SharePoint SDK: http://msdn.microsoft.com/en-us/library/ff426881.aspx

Ashish Patel