그래프 API 버전

대화 /{conversation-id}

사용자와 Facebook 페이지 또는 Instagram 프로페셔널 계정 사이의 Messenger 대화입니다.

읽기

그래프 API 탐색기
GET /v19.0/{conversation-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(
    '/{conversation-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(
    "/{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();
/* 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
}];

권한

Instagram 메시지의 경우 다음도 필요합니다.

제한 사항

  • Instagram 메시지에 대해 이 엔드포인트를 쿼리하면 이 대화에 대한 모든 메시지가 반환됩니다. 그러나 대화에서 가장 최근 메시지 20개에 대한 데이터만 쿼리할 수 있습니다. 가장 최근 20개보다 이전의 메시지인 경우 메시지가 삭제되었다는 내용의 오류가 반환됩니다.

필드

이름 설명

id

문자열

대화의 ID

messages

문자열

대화 내의 메시지

participants

개체

id


email

페이지 메시지 전용

name

페이지 메시지 전용

username

Instagram 메시지 전용

대화의 참가자


사용자의 Instagram 범위 ID나 페이지 범위 ID, 또는 Instagram 프로페셔널 계정의 Instagram ID나 페이지 ID.

사용자 또는 페이지의 이메일


사용자 또는 페이지의 이름


어떤 사용자의 Instagram 사용자 이름 또는 Instagram 프로페셔널 계정

updated_time

datetime

대화에 마지막 메시지가 추가된 시각

대화 내의 특정 메시지에 대한 정보를 얻으려면 메시지 엔드포인트로 요청을 보내세요.

게시

이 에지를 사용하여 게시할 수 없습니다.

Messenger 플랫폼을 사용하여 템플릿, 빠른 답장 등을 전송합니다.

삭제

이 에지를 사용하여 삭제할 수 없습니다.

업데이트

이 에지를 사용하여 업데이트할 수 없습니다.

에지

이름 설명 게시하는 데 사용

/messages

대화의 모든 메시지 리스트

답장(페이지 전용)