Phiên bản API Đồ thị

File trong nhóm

File được tải lên nhóm này.

Đọc

Trình khám phá API Đồ thị
GET /v19.0/{group-id}/files 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}/files',
    '{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}/files",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{group-id}/files",
    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}/files"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Yêu cầu

Loại yêu cầuMô tả

Xét duyệt ứng dụng

Ứng dụng của bạn phải được phê duyệt tính năng API Nhóm.

Cài đặt ứng dụng

Ứng dụng phải được cài đặt trong Nhóm.

Mã truy cập Người dùng.

Trường

Tên Mô tả Loại

download_link

URL để tải file xuống.

string

group

Nhóm mà file được tải lên (giống với Nhóm trong yêu cầu).

Group

id

ID của file. Giờ thì bạn không thể yêu cầu từng file theo ID, mà chỉ có thể yêu cầu qua cạnh này.

string

message

Văn bản đi kèm bài viết chứa file.

string

updated_time

Lần cuối file được thay đổi.

datetime

Đăng

Thao tác này không được hỗ trợ.

Xóa

Thao tác này không được hỗ trợ.

Cập nhật

Thao tác này không được hỗ trợ.