Skip to main content

Save Post

The LikeMinds iOS feed SDK provides "Save Post" feature. You can integrate it in your iOS app to enhance user experience by allowing them to bookmark and revisit their favorite posts at their convenience. Enable seamless content curation, empowering users to organize and access valuable information with ease.

Steps to save a post

  1. Create a SavePostRequest object using SavePostRequest.builder() class by passing all the required parameters.
  2. Call savePost() function using the instance of LMFeedClient.
  3. Process the response LMResponse<NoData> as per your requirement.
// object of SavePostRequest
let request = SavePostRequest.builder()
.postId(ENTER_POST_ID) // id of the post to be saved
.build()
LMFeedClient.shared.savePost(request) { response in
// response (LMResponse<NoData>)
if (response.success) {
// your function to process post saved action
processResponse()
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

SavePostRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
postIdStringUnique id of the post saved.