グラフAPIバージョン

リンク/{link-id}

Facebookでシェアされるリンク。

読み取り

グラフAPIエクスプローラ
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
}];

アクセス許可

  • リンクが公開されている場合は、任意の有効なアクセストークン

フィールド

名前 説明

id

リンクID。

string

created_time

メッセージが公開された時間。

datetime

description

リンクの説明(リンクキャプションの下に表示されます)。

string

from

リンクを作成したユーザー。

User

icon

Facebookがフィードに表示するリンクアイコンのURL。

string

link

シェアされたURL。

string

message

リンクに関するユーザーからの任意のメッセージ。

string

name

リンクの名前。

string

picture

リンク投稿で使用されるサムネイル画像のURL。

string

reactions


v8.0以上では廃止。

リンクへのリアクション、いいね!、超いいね!、すごいね、うけるね、SORRY、ひどいね、なし。

string

公開

公開については、シェアについてのドキュメントをご覧ください。

アップデート

グラフAPIを使ってリンクをアップデートすることはできません。

エッジ

名前 説明

/likes

このリンクに「いいね!」した人。

/comments

このリンクへのコメント。