Comments and Social Graph

Use the built-in integration between Comments and Social Graph to filter and count comments by authors that fans follow.

Common parameters

The relationship_type parameter species what kind of relationship to filter responses by. Its value should be the relationship type key like follows belonging to the relationship type from the social graph to filter by.

The relationship_from_profile_id species the perspective that the filtering should be from. Its value should be the profile ID in the from part of the relationship. For example, if Alice follows Bob, then the relationship is from Alice to Bob, and Alice would be the from part. If this parameter is not provided then it defaults to the authenticated user.

Filter comments by profile relationship

Use the relationship_type and relationship_from_profile_id parameters on the List comments endpoint to filter comments by authors matching the given relationship. For example, to find comments authored by users that example-profile-id follows:

GET /api/v1/comments/?relationship_type=follow&relationship_from_profile_id=example-profile-id&comment_board_id=example-board-id

If the relationship_from_profile_id is omitted, it is assumed to be the authenticated profile:

GET /api/v1/comments/?relationship_type=follow&comment_board_id=example-board-id
Authorization: Bearer {access-token}

The above will return comments authored by users that the authenticated user follows.

Count comments by profile relationship

Use the relationship_type and relationship_from_profile_id parameters on the Get comment counts endpoint to count comments by authors that match the given relationship.

GET /api/v1/comment-counts/?relationship_type=follow&relationship_from_profile_id=example-profile-id&comment_board_id=example-board-id

What’s Next