7

Does anyone know if there is a way to leverage the SocialFollowingManager() class or the SPList() class to efficiently get a collection of all of the users that follow a specific List?

I thought about trying SPList().GetItems(), but I'm not getting the users who follow the list, just the list items.

The only way I can think to do this is to iterate through the entire userbase, create a SocialFollowingManager() for each user, and then leverage the SocialFollowingManager().IsFollowed(SPSocialActor targetList) method to see if that individual user is following the list.

I can't imagine that there doesn't exist a more efficient way to do this... has anyone had experience with this before?

5
  • 2
    This is really more of an idea than an answer, so I'll just leave this here...I suspect you might need to loop through all users to get what you're looking for. You might consider writing a timer job (assuming on-prem) that runs overnight, and dumping your results to a list or some other data store. How many users do you have, by the way? Nov 13, 2014 at 20:52
  • Thanks for the input, Derek... I thought about that solution as well, but sadly, I have 5000+ users, and don't know if SharePoint can handle that volume with any efficiency.
    – gfppaste
    Nov 13, 2014 at 20:56
  • 1
    by follow do you mean people who get alerts from this list?
    – Gwny
    Aug 17, 2015 at 8:00
  • In addition to @Gwny - there is no definition for a list in the SPSocialActorTypes enumeration, so you can't follow a list.
    – Mx.
    Aug 4, 2016 at 8:03
  • but you Can set an alert to a list, that's what I meant
    – Gwny
    Aug 4, 2016 at 12:30

1 Answer 1

-1

Check this link out - http://sundarnarasiman.net/?p=186

It might not be same, but can help in getting the logic. Hope it helps!

3
  • 2
    Please do not post link only answers. Add relevant parts from the link to your post to make it helpful even if the link breaks Nov 27, 2015 at 10:45
  • Sure Robert, will take care of that in future. Nov 27, 2015 at 11:20
  • 1
    Please do it for this post as well so it doesn't get deleted Nov 27, 2015 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.