Graph API 版本

群組檔案

上載至此群組的檔案。

讀取

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

必要條件

要求類型說明

應用程式審查

您的應用程式必須獲准使用群組 API 功能。

應用程式安裝

必須在群組中安裝應用程式。

憑證

用戶存取憑證。

欄位

名稱 說明 類型

download_link

下載檔案的網址。

string

group

檔案的上載目的地群組(與要求中的群組相同)。

Group

id

檔案的編號。請注意,您無法透過檔案編號單獨要求取得每個檔案,只能透過此關係連線要求取得檔案。

string

message

檔案帖子中包含的文字。

string

updated_time

最後一次變更檔案的時間。

datetime

發佈

不支援這項操作。

刪除

不支援這項操作。

更新

不支援這項操作。