Stream.remove
From Facebook Developer Wiki
Contents |
Description
This method removes a post from a user's or event's Wall. The post also gets removed from the user's and the user's friends' News Feeds.
Your application may only remove posts that were created through it.
Desktop applications must pass a valid session key, and can remove posts only from the user associated with that session key. Other applications can delete any post that they published, provided you have a valid post_id. Web applications must pass either a valid session key or a user ID.
In order to remove a post from a user's or event's Wall, the current user must grant your application the publish_stream extended permission.
Parameters
| Required | Name | Type | Description | |
| optional | session_key | string | The session key of the logged in user. The session key is automatically included by our PHP client. Desktop applications must pass a valid session key (and have been granted the publish_stream extended permission); other applications need only the publish_stream extended permission. | |
|---|---|---|---|---|
| required | post_id | string | The ID for the post you want to remove. | |
| optional | uid | string | The user ID of the user whose post you want to delete. 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. |
Example Requests
Response
This call returns true if the post was removed, or false and an error code if the post was not removed.
Error Codes
| Code | Description | |
| 100 | Invalid parameter. | |
|---|---|---|
| 102 | Session key invalid or no longer valid (if it's a desktop application and the session is missing). | |
| 200 | Permissions error. The application does not have permission to perform this action. | |
| 210 | User not visible. The user doesn't have permission to act on that object. |
Notes
You can call this method using a session secret, and not the application secret (for example, for a Facebook Connect site or desktop application).
