The Facebook Pages that a person owns or is able to perform tasks on.
Pages the User has a role on
A Page access token for a User with a role (other than Live Contributor) on the Page and the following permissions:
pages_show_list
permissionbusiness_id
or for a user who owns any business Pages, the app must be approved for the business_management
permission.Note: In order for a Page to be returned, the User must also grant the app running the query the pages_show_list
permissions for that Page.
business_management
permission is required GET /v19.0/{user-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(
'/{user-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(
"/{user-id}/accounts",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{user-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:@"/{user-id}/accounts"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
curl -X GET -G \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v19.0/{user-id}/accounts
Jika membaca dari edge ini, maka akan mengembalikan hasil berformat JSON:
{ "
data
": [], "paging
": {}, "summary
": {} }
data
Kolom berikut ini akan ditambahkan ke masing-masing node yang dikembalikan:
Kolom | Keterangan |
---|---|
tasks list<enum> | The User's tasks assigned to the Page. |
paging
summary
Informasi agregat tentang edge tersebut, seperti jumlah. Tentukan kolom untuk diambil di parameter ringkasan (seperti ringkasan=total_count
).
Kolom | Keterangan |
---|---|
total_count int32 | Total number of objects on this edge |
Kesalahan | Description |
---|---|
459 | The session is invalid because the user has been checkpointed |
190 | Invalid OAuth 2.0 Access Token |
100 | Invalid parameter |
200 | Permissions error |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
104 | Incorrect signature |
80002 | There have been too many calls to this Instagram account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
2500 | Error parsing graph query |
80001 | There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
210 | User not visible |
This API lets you create Facebook pages.
pages_manage_metadata
and pages_show_list
permissions.category_enum
parameter with a Page Category.name
, about
, picture
, and cover_photo
. Note: When setting the locale, at least one, city_id
, location
, or coordinates
, is required. Caveats:
city_id
and location
can not be used togethercity_id
and coordinates
can be used together however the coordinates must be within the city selectedlocation
and coordinates
can be used together however the coordinates must be within the location selectedaccounts
edge from the following paths: Parameter | Keterangan |
---|---|
about UTF-8 encoded string | Short description |
address UTF-8 encoded string | Address |
category_enum string | Page category (enum). See Pages Categories API docs. |
category_list list<numeric string> | List of categories |
city_id city id | City ID |
coordinates JSON-encoded coordinate list | Coordinates |
cover_photo Object | Cover photo |
description UTF-8 encoded string | Description |
ignore_coordinate_warnings boolean | If ignore warnings generated in coordination validation (bool) |
location Object | This defines the location for this page. This is required if |
name UTF-8 encoded string | Page name Diperlukan |
phone UTF-8 encoded string | Phone |
picture URL | Profile picture |
website URL | Website |
zip string | Zipcode |
id
in the return type.id
: numeric string, Kesalahan | Description |
---|---|
200 | Permissions error |
100 | Invalid parameter |
152 | Invalid page type |
194 | Missing at least one required parameter |
368 | The action attempted has been deemed abusive or is otherwise disallowed |