ActivityFeed service exposes
Subscribe and
Unsubscribe methods which allows you to subscribe/unsubscribe from topics.
void Subscribe(string subscriberId, IEnumerable<Topic> topics);
void Unsubscribe(string subscriberId, IEnumerable<Topic> topics);
If the service does not find the user, an InvalidOperationException exception will be thrown.
IActivityFeedService servie = ServiceLocator.Resolve<IActivityFeedService>();
servie.Subscribe("user1", new Topic[] { new Topic("topi1") });
servie.Unsubscribe("user1", new Topic[] { new Topic("topic1") });
Note: You can find live example in source code: Samples/SampleSubscribeUnsubscribe.aspx