You can't read using this edge.
To reply with a private Message:
POST /v21.0/{object-id}/private_replies HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->post(
'/{object-id}/private_replies',
array (),
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{object-id}/private_replies",
"POST",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{object-id}/private_replies",
null,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{object-id}/private_replies"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Private replies to messages are allowed for only a limited time. The actual limit, usually several months, is subject to change.
This edge requires a Page access token with the following permissions:
read_page_mailboxes
Parameter | Description | Type |
---|---|---|
| The ID of the Page Comment or Visitor Post that you are replying to. |
|
| The text of the reply. This field is required. |
|
If successful, you will receive a response with the following fields. In addition, this endpoint supports read-after-write and can immediately read the node represented by id
in the return type.
Field | Description | Type |
---|---|---|
id | The ID of the newly created Message. |
|
user_id | The |
|
You can't delete using this edge.
You can't update using this edge.