Phiên bản API Đồ thị

Điểm cuối này ngừng hoạt động kể từ ngày 04/04/2018. Vui lòng xem nhật ký thay đổi để biết thêm thông tin.

/{app-id}/staticresources

Số liệu thống kê về việc sử dụng cho bất kỳ tài nguyên tĩnh nào mà một ứng dụng trên Facebook Canvas dùng.

Đọc

Trình khám phá API Đồ thị
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
}];

Quyền

  • Một mã truy cập dành cho người dùng cho quản trị viên của ứng dụng.

Trường

Tên Mô tả Loại

usage_stats

URL tài nguyên tĩnh kèm theo các phần tải trang đã sử dụng từng tài nguyên.

array

prefetched_resources

URL tài nguyên tĩnh hiện được kích hoạt sớm cho những người đang dùng ứng dụng.

array

https

Một đối tượng lại chứa usage_statsprefetched_resources, chỉ hiển thị những tài nguyên được truy cập qua HTTPS.

object

Đăng

Bạn không thể đăng bằng cạnh này.

Xóa

Bạn không thể xóa bằng cạnh này.