圖形 API 版本

社團文件 /{group-doc-id}

代表 Facebook 社團中的文件。/{group-doc-id} 節點會傳回單一文件。

讀取

圖形 API 測試工具
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
}];

權限

  • 若為公開社團(即社團的隱私設定為 OPEN),則任何有效的存取權杖皆可讀取

欄位

屬性名稱 說明 類型

id

社團文件編號。

string

from

建立此文件的個人檔案。

User|Page

subject

文件的標題。

string

message

文件的內文。此字串會包含文件中任何格式的 HTML,並且會進行 HTML 編碼。

string

icon

文件圖示的網址

string

created_time

文件建立的時間。

datetime

updated_time

文件上次變更的時間。

datetime

revision

代表目前文件修訂的編號。

int

can_edit

連線階段用戶是否可以編輯此文件。

boolean

can_delete

連線階段用戶是否可以刪除此文件(在 Facebook.com 上)。

boolean

embedded_urls

文件內嵌的網址

[string]

發佈

您不能透過圖形 API 建立文件。

刪除

您不能透過圖形 API 刪除文件。

更新

您不能透過圖形 API 更新文件。