Pin Post
In the LikeMinds iOS Feed SDK, users can conveniently "pin" posts, granting them the ability to highlight and prioritize important content on their feed. This feature ensures that selected posts remain prominently displayed at the top of the feed for improved visibility and easy access.
Steps to pin a post
- Create a PinPostRequest object using
PinPostRequest.builder()
class by passing all the required parameters. - Call
pinPost()
function using the instance ofLMFeedClient
. - Process the response LMResponse<NoData> as per your requirement.
// object of PinPostRequest
let request = PinPostRequest.builder()
.postId(ENTER_POST_ID) // id of the post to be pinned
.build()
LMFeedClient.shared.pinPost(request) { response in
// response (LMResponse<NoData>)
if (response.success) {
// your function to process post pinned action
processResponse()
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
PinPostRequest
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
postId | String | Unique id of the post pinned. |