Versão Graph API

Page Tabs

This endpoint is not supported for Pages that have been migrated to the New Pages Experience.

This edge allows you get Page Tabs.

Leitura

Get a list of Tab nodes on a Page.

Requirements

You will need the following:

If a person is not able to perform the task on the Page, you will need the following:

  • The Pages Public Content Access feature
Para evitar problemas de limitação de volume ao utilizar o recurso Acesso ao Conteúdo Público da Página, recomendamos o uso de um token de acesso do usuário do sistema.

Limitations

  • To ensure tabs lead to high-quality, accurate content, the Page Tabs feature is only available to Pages with 2000 or more likes.

Feature Permissions

NomeDescrição
Acesso ao Conteúdo Público da PáginaThis feature permission may be required.

Exemplo

Graph API Explorer
GET /v19.0/{page-id}/tabs 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(
    '/{page-id}/tabs',
    '{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(
    "/{page-id}/tabs",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/tabs",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}/tabs"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Se quiser saber como usar a Graph API, leia nosso guia sobre Como usar a Graph API.

Parâmetros

ParâmetroDescrição
tab
list<string>

SELF_EXPLANATORY

Campos

A leitura desta borda retornará um resultado formatado em JSON:

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

data

Uma lista de nós Tab.

paging

Para saber mais detalhes sobre paginação, consulte o Guia da Graph API.

Error Codes

ErroDescrição
200Permissions error
190Invalid OAuth 2.0 Access Token
100Invalid parameter

Criando

Não é possível executar esta operação neste ponto de extremidade.

Atualizando

Não é possível executar esta operação neste ponto de extremidade.

Excluindo

Não é possível executar esta operação neste ponto de extremidade.