Please note: We are in the process of deprecating the REST API, so if you are building a new application you shouldn't use this function. Instead use the Graph API and issue a DELETE to the comment id. |
This method removes a comment from a post.
Privacy rules apply to the posts from which the user can delete comments; if the post is on the user's Wall, any comment can be deleted. If the post is on a friend's Wall, only comments made by the user can be deleted.
Desktop applications must pass a valid session key, and can remove comments made by the user associated with that session key only. Other applications can delete any comments, provided you have a valid post_id.
In order to remove a comment, the user must grant your application the publish_stream
extended permission.
Name | Type | Description |
---|---|---|
comment_id | string | The ID for the comment you want to remove. |
uid | int | The user ID of the user who made the comment. If this parameter is not specified, then it defaults to the session user. Note: This parameter applies only to Web applications and is required by them only if the session_key is not specified. Facebook ignores this parameter if it is passed by a desktop application. |
This call returns true if the comment was removed, or false and an error code if the comment was not removed.