Graph API Version

/{object-id}/private_replies

This edge allows Pages to reply to Post Comments and Visitor Posts with a private Message. It can be used with the following nodes:

Please note that a comment or post may only be replied to once.

Reading

You can't read using this edge.

Publishing

To reply with a private Message:

POST /v2.10/{object-id}/private_replies HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/{object-id}/private_replies'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* 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.

Permissions

This edge requires a Page access token with the following permissions:

  • read_page_mailboxes

Fields

ParameterDescriptionType

id

The ID of the Page Comment or Visitor Post that you are replying to.

string

message

The text of the reply. This field is required.

string

Response

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.

FieldDescriptionType

id

The ID of the newly created Message.

string

Deleting

You can't delete using this edge.

Updating

You can't update using this edge.