Members Followers: Sample use cases & Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.

Your app could assist site owners in adding a widget that displays connections of connections, along with the number of connections a member shares in common with them.

  1. Retrieve all members of a site by calling the List Members endpoint.
  2. For each member, retrieve their followers using the List Member Followers endpoint, count them, and sort the results by the highest number of followers.

Create a “People you may know” widget based on 2nd-degree connections

Your app could help site owners add a widget showing connections of connections, and how many connections the specified member has in common with them.

  1. Get the specified member's connections using the List Member Followers endpoint and the List Member Following endpoint.

  2. For each direct connection, get their connections in both directions, using the same endpoints as in step 1.

  3. Using the list of indirect connections from step 2, query any existing relationships to the specified member, using the Query Member Connections endpoint.

  4. Sort the resulting list of potential connections into the following sets:

    • The specified member already follows the second-degree connection. Remove them from the suggestion list.
    • The second-degree connection follows the specified member. Add to a "follows you" sub-list.
    • There is not yet any direct connection to the second-degree connection. These are the members to use for the suggestion list.
  5. For each remaining suggestion, use the List Members endpoint to display details for the specified member, and provide "Follow this Member" links using the Follow Member endpoint.

Did this help?