Graph API Version

Conversation /{conversation-id}

A Facebook Messages conversation between a person and a Facebook Page.

Related Guides

Reading

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

Permissions

  • A page access token with read_page_mailboxes permission can be used to view any conversation that Page is involved with.
  • A user access token with read_mailbox permission can be used to view any conversation that person is involved with if they are a developer of the app making the request.

Fields

NameDescriptionType

id

The ID of a conversation, in a format similar to t_id.000000000000000.

string

snippet

The snippet of the most recent message in a conversation.

string

updated_time

Last update time.

datetime

message_count

The number of messages.

int

unread_count

The number of unread messages.

int

tags

A set of tags indicating the message folder and source of the conversation.

object

name

The name of the message folder or source.

string

participants

People and Pages who are on this conversation.

User[]

senders

People who have sent a message.

User[]

can_reply

Whether the Page is able to reply.

boolean

is_subscribed

Whether the Page is subscribed to the conversation

boolean

Publishing

You can't publish using this edge.

Deleting

You can't delete using this edge.

Updating

You can't update using this edge.

Edges

NameDescriptionUsed to Publish

/messages

List of all messages in the conversation

Replies (by Pages only)