그래프 API 버전

그래프 API 참고 자료 /{conversation-id}/messages

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

읽기

그래프 API 탐색기
GET /v19.0/{conversation-id}/messages 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}/messages',
    '{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}/messages",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{conversation-id}/messages",
    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}/messages"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

권한

  • 페이지에서 MESSAGING 작업을 수행할 수 있는 사용자가 요청한 페이지 액세스 토큰이 있어야 함
  • Instagram 메시지의 경우 instagram_manage_messages 권한도 필요함

필드

추가적 필드를 포함하여 메시지 개체의 배열을 반환합니다.

이름 설명 유형

벡터

벡터

메시지 전송

이 엔드포인트로 메시지를 보낼 수 없습니다. 대신 Send API를 사용하세요.

삭제

이 엔드포인트를 삭제할 수 없습니다.