Phiên bản API Đồ thị

Tài liệu trong nhóm /{group-doc-id}

Biểu thị tài liệu trong một nhóm Facebook. Nút /{group-id} trả về một tài liệu.

Đọc

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

Quyền

  • Bất kỳ mã truy cập hợp lệ nào nếu nhóm ở chế độ công khai (tức là cài đặt quyền riêng tư của nhóm là OPEN)

Trường

Tên thuộc tính Mô tả Loại

id

ID tài liệu trong nhóm.

string

from

Trang đã tạo tài liệu này.

User|Page

subject

Tiêu đề của tài liệu.

string

message

Phần nội dung của tài liệu. Chuỗi này sẽ chứa HTML cho bất kỳ định dạng nào trong tài liệu và sẽ được mã hóa HTML.

string

icon

URL cho biểu tượng của tài liệu

string

created_time

Thời điểm tạo tài liệu.

datetime

updated_time

Lần cuối tài liệu được thay đổi.

datetime

revision

ID biểu thị bản sửa đổi tài liệu hiện tại.

int

can_edit

Liệu người dùng phiên có thể chỉnh sửa tài liệu này hay không.

boolean

can_delete

Liệu người dùng phiên có thể xóa tài liệu này (trên Facebook.com) hay không.

boolean

embedded_urls

URL để nhúng tài liệu

[string]

Đăng

Bạn không thể tạo tài liệu qua API Đồ thị.

Xóa

Bạn không thể xóa tài liệu qua API Đồ thị.

Cập nhật

Bạn không thể cập nhật tài liệu qua API Đồ thị.