图谱 API 版

此端点已于 2018 年 4 月 4 日停用。详情请参阅更新日志

/{app-id}/staticresources

Facebook Canvas 应用使用的任何静态资源的使用情况数据。

读取

图谱 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

发布

您无法使用此连线进行发布。

删除

您无法使用此连线进行删除。