그래프 API 버전

Application Accounts

Represents a collection of test users on an app.

읽기

Get a list of test users on an app.

Requirements

TypeRequirement

Access Tokens

App

Permissions

None

Graph API Explorer
GET /v19.0/{application-id}/accounts 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(
    '/{application-id}/accounts',
    '{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(
    "/{application-id}/accounts",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{application-id}/accounts",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{application-id}/accounts"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
그래프 API를 사용하는 방법을 알아보려면 그래프 API 사용 가이드를 읽어보세요.

매개변수

매개변수설명
type
enum{test-users}

The type of user requested

필드

이 에지로부터 읽는 경우 JSON 형식의 결과를 반환합니다:

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

data

TestAccount 노드 리스트.

다음 필드는 반환된 각 노드에 추가됩니다:

필드설명
access_token
string

An access token that can be used to make API calls on behalf of this user

paging

페이지 매김에 대한 자세한 정보는 그래프 API 가이드를 확인하세요.

오류 코드

오류설명
190Invalid OAuth 2.0 Access Token
200Permissions error
100Invalid parameter

만들기

다음 경로에서 accounts 에지에 POST 요청을 만들 수 있습니다:
이 에지에 게시할 때 a TestAccount이(가) 생성됩니다.

Upon successful creation, a login_url and access_token will be returned. You can use the login URL to log in as the test user. Login URLs expire once they are used, or after one hour if they are unused. An access token will only be returned if the installed parameter was set to true at the time of the query.

You can also use this edge to associate an existing test user with a different app by using the owner_acces_token parameter.

Requirements

TypeRequirement

Access Tokens

App

Permissions

None

매개변수

매개변수설명
installed
boolean

Automatically installs the app for the test user once it is created or associated

minor
boolean

Is this test user a minor

name
string

The name for the test user. When left blank, a random name will be automatically generated

owner_access_token
string

When associating existing test users with other apps, this is the app access token of any app that is already associated with the test user. The {app-id} in the publishing request in this case should be the app that will is the target to associate with the test user. The API request should also be signed with the app access token of that target app. Required when associating test users, but should not be used when creating new test users

permissions
List<Permission>
기본 값: Set

List of permissions that are automatically granted for the app when it is created or associated

type
enum{test-users}

Type

uid
int

ID of an existing test user to associate with another app. Required when associating test users, but should not be used when creating new test users

반환 유형

이 엔드포인트는 기록 후 읽기를 지원하며 반환 유형에서 id로 표시되는 노드를 읽습니다.
Struct {
id: numeric string,
access_token: string,
login_url: string,
email: string,
password: string,
}

오류 코드

오류설명
2900Too many test accounts
190Invalid OAuth 2.0 Access Token
100Invalid parameter

업데이트 중

이 엔드포인트에서 수행할 수 없는 작업입니다.

삭제 중

/{application_id}/accounts에 DELETE 요청을 만들어 an Application에서 a TestAccount을(를) 분리할 수 있습니다.

Requirements

TypeRequirement

Access Tokens

App

Permissions

None

Limitations

At least one test user must be associated with an app. Attempting to perform this operation on an app's sole test user will result in error code 2902.

매개변수

매개변수설명
type
enum {TEST_USERS}

Account type

uid
UID

Account UID

필수

반환 유형

Struct {
success: bool,
}

오류 코드

오류설명
100Invalid parameter