Post Seen
The LikeMinds Android Feed SDK incorporates a user-ranked feed feature that enables users to get their personalised feed, and to dampen a post based on viewing calling postSeen()
.
Steps to set posts as seen
- Create a PostSeenRequest object using
PostSeenRequest.Builder
class by passing all the required parameters. - Call
postSeen()
function using the instance ofLMFeedClient
. - Process the response LMResponse<
Nothing
> as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of GetPostLikesRequest
val postSeenRequest = PostSeenRequest.Builder()
.seenPostIds(["ENTER POST IDS"])
.build()
// get response (LMResponse<Nothing>)
val response = LMFeedClient.getInstance().postSeen(postSeenRequest)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
PostSeenRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
seenPostIds | List<String> | List of post ids which are seen by the user. |