Версия API Graph

Беседа /{thread-id}

Беседа в Сообщениях на Facebook.

Страницы должны использовать конечную точку Conversation.

Чтение

Получение беседы.

Graph API Explorer
GET /v19.0/{thread-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{thread-id}',
    '{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(
    "/{thread-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{thread-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{thread-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Имя Описание Тип

id

Уникальный ID беседы.

string

comments

Сообщения в этой беседе.

Message[]

to

Профили, подписанные на беседу.

unread

integer

unseen

integer

updated_time

Время последнего обновления беседы.

datetime

can_reply

Флаг, указывающий, может ли Страница отправлять ответы в этой беседе.

boolean

linked_group

ID группы Workplace, с которой связана беседа (только для Workplace).

string

Границы контекста

Имя Описание

messages

Список отдельных сообщений в беседе.

Фильтрация сообщений

Публикация

Эта операция для данной конечной точки не поддерживается.

Эта операция для данной конечной точки не поддерживается.

Обновление

Эта операция для данной конечной точки не поддерживается.