Comments.remove
From Facebook Developer Wiki
Contents |
Description
This method removes a comment from an xid on behalf of a user (or not).
Desktop applications must pass a valid session key, and only comments made by the user can be removed by that user. When using the app secret, an application may remove any of its comments.
Parameters
| Required | Name | Type | Description | |
| required* | xid | string | The xid of a particular Comments Box or fb:comments. You must specify either an xid or an object_id. | |
|---|---|---|---|---|
| object_id | string | The object_id of an object on Facebook. This can be a video, note, link, photo, or photo album. Note that for photos and albums, the object_id must be queried from the photo and album FQL tables. You must specify either an xid or an object_id. | ||
| required | comment_id | string | The comment_id, as returned by comments.add or comments.get, to be removed. | |
| optional | session_key | string | The session key of the logged in user. The session key is automatically included by our PHP client. Desktop and JavaScript Client Library applications must pass a valid session key. |
Example Requests
$facebook->api_client->comments_remove(xid, comment_id);
Response
This call returns true if the comment was removed successfully, or an error code if the call was unsuccessful.
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).
See Also
- Comments API
- Comment FQL Table
- comments.get - A wrapper around the FQL table.
- comments.add
