social.plus SDK provides the getGlobalStoryTargets() function to retrieve all active story targets across your application with intelligent filtering and optimized sorting. Build comprehensive story discovery feeds with real-time updates and smart content prioritization.

Smart Filtering

Intelligent query options that prioritize unseen content for optimal engagement

Optimistic Sync

Prioritizes unsynced story targets for immediate user feedback

Flexible Sorting

Multiple query options for different discovery and engagement patterns
Global story targets provide a comprehensive view of all story activity across your application, with intelligent filtering to surface the most relevant content to users.

Query Options Overview

The getGlobalStoryTargets() function supports four distinct query options, each optimized for different user experience patterns and discovery scenarios:

SMART

Recommended: Combines unseen and seen targets for optimal discovery

UNSEEN

Engagement Focus: Only targets with unviewed stories

SEEN

Revisit Mode: Only targets with all stories viewed

ALL

Complete View: All active story targets regardless of view status

Query Options Detailed

The SMART option provides the optimal user experience by intelligently combining unseen and seen story targets in a single collection.
BehaviorDescription
Content OrderUnseen targets first, then seen targets
PrioritizationUnsynced targets appear at the top
SortingRecent creation first within each category
Use CasePrimary story discovery feeds

Individual Query Options

OptionFilterSortingUnsynced TargetsBest For
SEENOnly viewed targetsRecent creation firstExcludedRevisiting content
UNSEENOnly unviewed targets1st: Unsynced first
2nd: Recent creation
IncludedNew content focus
ALLNo filter1st: Unsynced first
2nd: Recent creation
IncludedComplete overview
SMARTCombined UNSEEN + SEENConcatenated resultsIncludedOptimal discovery

Implementation

Parameters

ParameterTypeRequiredDescription
queryOptionEnumYesFiltering and sorting strategy for story targets
token = storyRepository.getGlobalStoryTargets(option: .smart).observe({ collection, change, error in
    // Handle list of story targets here.
})