그래프 API 버전

스레드 /{thread-id}

Facebook 메시지 대화 스레드입니다. 이 엔드포인트에는 요청을 보내는 앱의 개발자인 사용자만 액세스할 수 있습니다.

페이지는 대화 엔드포인트를 사용해야 합니다.

읽기

메시지 스레드를 가져옵니다.

권한

그래프 API 탐색기
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

스레드를 구독하는 프로필.

Profile[]

unread

세션 프로필에서 읽지 않은 메시지 양.

integer

unseen

세션 프로필에서 확인하지 않은 메시지 양.

integer

updated_time

스레드가 마지막으로 업데이트된 시각.

datetime

can_reply

스레드에서 페이지 답장을 보낼 수 있는지 여부.

boolean

linked_group

스레드가 연결된 Workplace 그룹의 ID(Workplace 전용).

string

에지

이름 설명

messages

스레드의 개별 메시지 리스트. 메시지 참조

메시지 필터링

messages 연결은 Messenger 앱에서 스레드 경고에 포함된 텍스트를 가져오지 않도록 필터링할 수 있습니다. 이 작업은 source 필터를 통해 수행되며, 참가자만 선택할 수 있습니다.

이 필터가 적용되지 않으면 관리자 텍스트(Messenger의 스레드에 회색 텍스트로 표시됨)도 검색됩니다.

이 호출은 참가자가 보낸 최근 메시지 3개만 검색합니다.

curl -i -X GET \
 "https://graph.facebook.com/v4.0/t_10155839492600149?fields=id,messages.source(PARTICIPANTS).limit(3)&access_token=<Access Token>"

게시

이 엔드포인트에서는 해당 작업을 수행할 수 없습니다.

삭제

이 엔드포인트에서는 해당 작업을 수행할 수 없습니다.

업데이트

이 엔드포인트에서는 해당 작업을 수행할 수 없습니다.