This document refers to an outdated version of Graph API. Please use the latest version.
Graph API Version

URL /?id={url}

Represents an external URL as it relates to the Facebook social graph - shares and comments from the URL on Facebook, and any Open Graph objects associated with the URL.

This endpoint replaces engagement counts found on the now retired Facebook REST APIs. However, there are some counts that were in the REST API that are not available in this API. Please see below for the list of supported counts.

Reading

Graph API Explorer
GET /v3.0/?id=http%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt2015381%2F 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(
    '/',
    '{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(
    "/",
    {
        "id": "http:\/\/www.imdb.com\/title\/tt2015381\/"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("id", "http://www.imdb.com/title/tt2015381/");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/",
    params,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"id": @"http://www.imdb.com/title/tt2015381/",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • Any access token can be used to make this request.

Fields

Property Name Description Type

app_links

AppLinks data associated with this URL, if available.

AppLinks

id

The URL itself.

string

engagement

Counts of different ways people interacted with the URL.

object

comment_count

Number of comments on the URL.

int

comment_plugin_count

Number of comments on the plugin gathered using the Comments Plugin on your site.

int

reaction_count

Number of reactions to the URL.

int

share_count

Number of times the URL was shared.

int

og_object

The Open Graph object that is canonically associated with this URL.

OGObject

id

ID of object.

string

description

The description of the object, if available.

string

title

The title of the object, if available.

string

type

The object type.

og:type

updated_time

When the object was last updated.

datetime

Sample Request of Engagement Counts

curl -i -X GET \
  "https://graph.facebook.com/vX.X/?id=http%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt2015381%2F&fields=engagement&access_token=user-access-token"

Sample Response

{
  "engagement": {
    "reaction_count": 45315,
    "comment_count": 31742,
    "share_count": 25671,
    "comment_plugin_count": 3
  },
  "id": "http://www.imdb.com/title/tt2015381/"
}

Publishing

You cannot publish this info via the Graph API.

Deleting

You cannot delete this info via the Graph API.

Updating

You cannot update this info via the Graph API.