Get Story Targets
Last updated
Last updated
The 'getStoryTarget()
' function in the Social Plus SDK enables real-time observation of StoryTarget based on specified targets. This function returns a LiveObject of StoryTarget, enabling users to receive updates and check whether the target possesses unseen stories. For example, you can call this method if you'd like to implement an unseen story ring for your story feed.
This function requires two parameters: targetType, targetId.
Here's an explanation of the function parameters:
targetType
: Represents the type of target, currently supporting 'community.'
targetId
: Corresponds to the ID of the designated target.
In addition to the getStoryTarget()
function, the Social Plus SDK provides 'getStoryTargets()
' function to enable retrieval of multiple StoryTargets. This function takes an input as an array of targets
and returns a LiveCollection of StoryTargets, enabling users to observe updates of multiple StoryTargets.
Here's an explanation of the function parameter:
targets
: Represents an array of pairs of targetType
and targetId
The function can accept a maximum of 10 pairs of targets in the array.