Stream.deletePost
From Social ID Developers
Contents |
Description
Deletes a post by the id, if the currently logged in user is the original author.
Usage
stream.deletePost(postId, handler)
Parameters
handler | optional | callback function to handle the API response. | postId | required | id of the post to be deleted. |
---|
API Response
data | Always "null". This API doesn't return any data. | status | API call status. Can be "success" on a successful operation, or "internal_server_error" if any unknown error happens. |
---|
Example
Delete a post on the stream:
var handler = function(response) { if (response.status == "success") { alert("Post deleted."); } else { alert("Couldn't delete the post."); } } var groupId = 1; var streamId = "productReviews456"; var stream = socialid.comments.getStream(groupId, streamId); var postId = 902; stream.deletePost(postId, handler);