Versione API Graph

Link /{link-id}

Un link condiviso su Facebook.

Lettura

Tool di esplorazione per la API Graph
GET /v19.0/{link-id} 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(
    '/{link-id}',
    '{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(
    "/{link-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{link-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{link-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Autorizzazioni

  • Qualsiasi token d'accesso valido se il link è pubblico.

Campi

Nome Descrizione Tipo

id

L'ID del link.

string

created_time

L'ora in cui il messaggio è stato pubblicato.

datetime

description

Una descrizione del link (visibile sotto la didascalia con link).

string

from

L'utente che ha creato il link.

User

icon

Un URL all'icona del link mostrato da Facebook nel feed.

string

link

L'URL condiviso.

string

message

Il messaggio opzionale da parte dell'utente riguardo al link.

string

name

Il nome del link.

string

picture

Un URL all'immagine in miniatura usata nel post con link.

string

reactions


Dichiarato obsoleto a partire dalla v8.0.

Reazioni (MI PIACE, LOVE, WOW, AHAH, SIGH, GRRR, NESSUNA) a un link.

string

Pubblicazione

Fai riferimento alla documentazione sulla condivisione per la pubblicazione.

Aggiornamento

Non puoi aggiornare un link con l'API Graph.

Segmenti

Nome Descrizione

/likes

Persone che hanno messo "Mi piace" a questo link.

/comments

Commenti a questo link.