Skip to main content
The Follower/Following Lists feature provides comprehensive access to user relationship data through live collections. These lists enable you to build social features like follower displays, mutual connection discovery, and relationship management interfaces.

Live Collections

Real-time updated follower and following lists with automatic synchronization

Status Filtering

Filter lists by connection status: accepted, pending, or all relationships

Pagination Support

Efficient handling of large follower/following lists with built-in pagination

Key Features

Follower Lists

Retrieve users who are following a specific user, with status-based filtering

Following Lists

Get users that a specific user is following, including pending requests

Status-based Filtering

Filter by connection status: accepted connections or pending requests

Real-time Updates

Live collections automatically update when relationships change
Follow Relationship Object Properties:
  • sourceUser: The user who initiated the follow action
  • targetUser: The user being followed
  • status: Connection status (accepted, pending, blocked)
  • createdAt: Timestamp when the relationship was created
  • updatedAt: Timestamp of the last status change
  • Own Lists: Full access to your follower/following lists
  • Other User Lists: Access based on privacy settings
  • Pending Requests: Only visible to relevant users
  • Blocked Users: Automatically excluded from results

Get Followers List

var token: AmityNotificationToken?

// Get My Followers List
func getMyFollowerList() {
    let followers = userRelationship.getMyFollowers(with: .accepted)
    token = followers.observe { collection, changes, error in
        // Handle the result
    }
}

//Get Other User Followers List
func getFollowerList() {
    let followers = userRelationship.getFollowers(withUserId: "<user-id>")
    token = followers.observe { collection, changes, error in
        // Handle the result
    }
}

Get Following List

var token: AmityNotificationToken?

// Get My Followers List
func getMyFollowerList() {
    let followers = userRelationship.getMyFollowings(with: .accepted)
    token = followers.observe { collection, changes, error in
        // Handle the result
    }
}

//Get Other User Followers List
func getFollowerList() {
    let followers = userRelationship.getFollowings(withUserId: "<user-id>")
    token = followers.observe { collection, changes, error in
        // Handle the result
    }
}