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 /v2.8/?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 */
$request = new FacebookRequest(
  $session,
  'GET',
  '/',
  array (
    'id' => 'http://www.imdb.com/title/tt2015381/',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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 NameDescriptionType

id

The URL itself.

string

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.

string

engagement

Engagements associated with this URL

object

count

Number that is shown on the like button for the URL

number

social_sentence

The full social sentence, e.g. You and 31,608,561 others like this.

string

title

The title of the object.

string

type

The object type.

og:type

updated_time

When the object was last updated.

datetime

url

This URL.

string

app_links

AppLinks data associated with this URL.

AppLinks

share

An object that supplies information about the URL being shared on Facebook.

object

comment_count

Number that is shown in the comments plugin associated with the URL. This number does not include comments that are made on posts on Facebook

int

share_count

This number is an aggregation of shares, likes, and comments for the URL. This number is approximate

int

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.