Graph API 版本

此端點已於 2018 年 4 月 4 日停用。請查看變更記錄了解更多資訊。

/{app-id}/staticresources

Facebook Canvas 應用程式所用靜態資源的使用情形統計資料。

讀取

Graph API 測試工具
GET /v19.0/{app-id}/staticresources 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(
    '/{app-id}/staticresources',
    '{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(
    "/{app-id}/staticresources",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{app-id}/staticresources",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{app-id}/staticresources"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

權限

  • 應用程式管理員的用戶存取憑證。

欄位

名稱 說明 類型

usage_stats

靜態資源網址,其中包含使用各項資源的網頁負載所佔比重。

array

prefetched_resources

靜態資源網址,這些網址目前正被清除,以提前供應用程式用戶使用。

array

https

包含上述 usage_statsprefetched_resources 的物件,僅顯示透過 HTTPS 存取的資源。

object

發佈

您無法使用此關係連線發佈內容。

刪除

您無法使用此關係連線刪除內容。