Phiên bản API Đồ thị

Business Client Apps

Đọc

This business can access these client-owned apps.

Ví dụ

Graph API Explorer
GET /v19.0/{business-id}/client_apps 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(
    '/{business-id}/client_apps',
    '{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(
    "/{business-id}/client_apps",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-id}/client_apps",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-id}/client_apps"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Nếu bạn muốn tìm hiểu cách sử dụng API Đồ thị, hãy đọc Hướng dẫn sử dụng API Đồ thị của chúng tôi.

Thông số

Điểm cuối này không có bất kỳ thông số nào.

Trường

Đọc từ cạnh này sẽ trả về một kết quả JSON đã định dạng:

{ "data": [], "paging": {}, "summary": {} }

data

Danh sách nút Application.

Các trường sau sẽ được thêm vào mỗi nút trả về:

TrườngMô tả
permitted_tasks
list<string>

Tasks that are assignable to users on this asset

paging

Để biết thêm chi tiết về chia trang, hãy xem hướng dẫn về API Đồ thị.

summary

Thông tin tổng hợp về cạnh, chẳng hạn số lượng. Hãy chỉ định các trường để tìm nạp trong thông số tóm tắt (như summary=total_count).

TrườngMô tả
total_count
int32

Total number of apps.

Mã lỗi

LỗiMô tả
368The action attempted has been deemed abusive or is otherwise disallowed
200Permissions error
190Invalid OAuth 2.0 Access Token
104Incorrect signature

Tạo

Bạn có thể tạo yêu cầu POST đến cạnh client_apps từ các đường dẫn sau:
Khi đăng lên cạnh này, hệ thống sẽ tạo an Application.

Thông số

Thông sốMô tả
app_id

App ID.

Bắt buộc

Kiểu trả về

Điểm cuối này hỗ trợ đọc sau khi ghi và sẽ đọc nút mà bạn đã đăng vào đó.
Struct {
access_status: enum,
}

Mã lỗi

LỗiMô tả
100Invalid parameter
200Permissions error

Cập nhật

Bạn không thể thực hiện thao tác này trên điểm cuối này.

Xóa

Bạn không thể thực hiện thao tác này trên điểm cuối này.