그래프 API 버전

그룹 피드

그룹에서 소유한 게시물로, 상태 업데이트와 링크를 포함합니다.

읽기

그룹의 게시물 배열을 반환합니다.

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

요구 사항

요구 사항 유형설명

앱 검수

앱이 그룹 API 기능에 대한 승인을 받아야 합니다.

앱 설치

앱이 그룹에 설치되어 있어야 합니다.

토큰

사용자 액세스 토큰 또는 페이지 액세스 토큰입니다.

참고

  • sinceuntil 매개변수는 updated_time 필드에 적용됩니다.

게시

POST /v19.0/{group-id}/feed HTTP/1.1
Host: graph.facebook.com

message=This+is+a+test+message
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{group-id}/feed',
    array (
      'message' => 'This is a test message',
    ),
    '{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(
    "/{group-id}/feed",
    "POST",
    {
        "message": "This is a test message"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("message", "This is a test message");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{group-id}/feed",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
NSDictionary *params = @{
  @"message": @"This is a test message",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{group-id}/feed"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

요구 사항

요구 사항 유형설명

앱 검수

앱이 다음의 로그인 권한과 기능에 대해 승인을 받아야 합니다(클릭하여 펼치기).

로그인 권한

publish_to_groups

기능

그룹 API

앱 설치

앱이 그룹에 설치되어 있어야 합니다.

토큰

그룹 구성원의 사용자 액세스 토큰입니다.

권한

사용자는 앱에 다음의 권한을 부여해야 합니다.

publish_to_groups

필드

이름유형설명

message

string

게시물의 메인 본문이 되며, 그 외에는 상태 메시지가 호출됩니다. link 또는 message를 제공해야 합니다.

link

string

게시물에 첨부할 링크의 URL입니다. link 또는 message를 제공해야 합니다. link와 관련된 추가 필드는 아래와 같습니다.

응답

성공할 경우 다음과 같은 정보가 포함된 응답을 받게 됩니다. 또한 이 엔드포인트는 쓰기 후 읽기를 지원하고 읽기 작업으로 반환된 모든 필드를 즉시 반환할 수 있습니다.

이름 설명 유형

id

새로 만든 게시물 ID입니다.

string

업데이트

지원되지 않는 작업입니다.

삭제

지원되지 않는 작업입니다.