그래프 API 버전

마일스톤 /{milestone-id}

이는 Facebook 페이지의 마일스톤을 나타냅니다.

관련 가이드

읽기

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

권한

페이지에 공개적으로 공유된 마일스톤을 확인하려면 다음 항목이 필요합니다.

관리하는 페이지의 마일스톤을 확인하려면 다음 항목이 필요합니다.

필드

이름 설명 유형

id

마일스톤 이벤트의 ID

string

title

마일스톤의 제목

string

from

마일스톤을 게시한 페이지

Page

description

마일스톤에 대한 설명

string

created_time

마일스톤의 생성 시간

datetime

updated_time

마일스톤의 업데이트 시간

datetime

start_time

마일스톤의 시작 시간

datetime

end_time

마일스톤의 종료 시간 페이지 마일스톤의 시작 및 종료 시간이 동일합니다.

datetime

만들기

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

페이지에 새 마일스톤을 만들려면 /{page-id}/milestones 엔드포인트를 사용하세요.

삭제

권한

관리하는 페이지의 마일스톤을 삭제하려면 다음 항목이 필요합니다.

DELETE /v19.0/{milestone-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->delete(
    '/{milestone-id}',
    array (),
    '{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(
    "/{milestone-id}",
    "DELETE",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{milestone-id}",
    null,
    HttpMethod.DELETE,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{milestone-id}"
                                      parameters:params
                                      HTTPMethod:@"DELETE"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

필드

삭제에 필요한 필드가 없습니다.

응답

성공한 경우:

{
  "success": true
}

실패할 경우 관련 오류 메시지가 반환됩니다.

업데이트

권한

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

에지

이름 설명

/likes

좋아요 리스트.

/comments

댓글 리스트.