Graph API-Version

Link /{link-id}

Ein auf Facebook geteilter Link

Lesen

Graph API Explorer
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
}];

Berechtigungen

  • Ein beliebiger gültiger Zugriffsschlüssel, wenn der Link öffentlich ist

Felder

Name Beschreibung Typ

id

Die Link-ID

string

created_time

Der Zeitpunkt, an dem die Nachricht veröffentlicht wurde.

datetime

description

Eine Beschreibung des Links (erscheint unter der Linkunterschrift).

string

from

Der Benutzer, der den Link erstellt hat.

User

icon

Eine URL zu dem Linksymbol, das Facebook im Feed anzeigt.

string

link

Die URL, die geteilt wurde.

string

message

Die optionale Nachricht des Benutzers über diesen Link.

string

name

Der Name des Links.

string

picture

Eine URL zu dem Miniaturbild, das im Link-Beitrag verwendet wird

string

reactions


Ab Version 8.0 veraltet.

Die Reaktionen LIKE, LOVE, WOW, HAHA, SORRY, ANGRY, NONE auf einen Link.

string

Veröffentlichen

Verwende die Dokumentation zum Teilen für das Veröffentlichen.

Aktualisieren

Du kannst einen Link nicht über die Graph API aktualisieren.

Edges

Name Beschreibung

/likes

Personen, denen dieser Link gefällt.

/comments

Kommentare zu diesem Link.