그래프 API 버전

그룹 사진첩

그룹용으로 만들어진 사진첩입니다.

읽기

그룹에서 사진첩 배열을 반환합니다.

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

요구 사항

요구 사항설명

앱 검수

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

앱 설치

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

토큰

사용자 액세스 토큰입니다.

필드

필드 확장을 통해 다음 사진첩 필드를 요청할 때 앱에 groups_access_member_info 권한을 부여한 사용자만 포함됩니다.

  • from
  • likes
  • reaction

게시

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

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

요구 사항

요구 사항 유형설명

앱 검수

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

로그인 권한

publish_to_groups

기능

그룹 API

앱 설치

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

토큰

앱이 설치된 그룹의 멤버인 사용자의 사용자 액세스 토큰입니다.

권한

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

publish_to_groups

필드

매개변수 설명 유형

name

사진첩에 부여된 이름입니다. 이 필드는 필수 항목입니다.

string

message

사진첩에 대한 설명으로, 피드에 상태 메시지로 표시됩니다.

string

응답

이름 설명 유형

id

새로 생성된 사진첩의 ID입니다.

string

삭제

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

업데이트

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