Graph API Version

Private Replies

This reference describes the /private_replies edge of the Comment node. This edge can be used by a Page to send private message replies to comments on their posts.

Reading

You can't read using this edge.

Publishing

You can send a new private reply message to a comment as below:

POST /v2.8/{comment-id}/private_replies HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/{comment-id}/private_replies'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{comment-id}/private_replies",
    "POST",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{comment-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:@"/{comment-id}/private_replies"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Only pages can create private replies.

  • A Page access token with the read_page_mailboxes permission is required to create a message.
  • A private reply must not have already been sent from the Page for a given comment.

Fields

ParameterDescriptionType

message

The text of the reply. This field is required.

string

Response

NameDescriptionType

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.