/?id={url}
Represents a URL shared on a timeline or in a comment.
Refer to our News Tab Indexing API documentation for additional information.
Get fields on a URLNode.
Type | Description |
---|---|
Access Tokens | Any access token can be used to make this request. |
Features | Not applicable. |
Page Tasks | Not applicable. |
Permissions | Not applicable. |
GET /{version}/?id={url} HTTP/1.1 Host: graph.facebook.com
{ "id": "{url}" }
Include the following query string parameters to augment the request.
Parameter | Description |
---|---|
Required string | An access token. |
string | A comma-separated list of fields you want to request. |
string | The url to be shared. |
string | A comma-separated list of scopes. |
Property Name | Description | Type |
---|---|---|
| AppLinks data associated with this URL, if available. | |
| The URL itself. |
|
| Counts of different ways people interacted with the URL. |
|
| The Open Graph object that is canonically associated with this URL. |
|
GET v10.0/?id=https://www.facebook.com?fields=engagement 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(
'?id=https://www.facebook.com?fields=engagement',
'{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=https://www.facebook.com",
{
"fields": "engagement"
},
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
Bundle params = new Bundle();
params.putString("fields", "engagement");
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"?id=https://www.facebook.com",
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 = @{
@"fields": @"engagement",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"?id=https://www.facebook.com"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
{ "engagement": { "reaction_count": 514919172, "comment_count": 68687082, "share_count": 975739682, "comment_plugin_count": 1641 }, "id": "https://www.facebook.com" }
You can't perform this operation on this endpoint.
Update a URL.
Type | Description |
---|---|
Access Tokens | Any access token can be used to make this request. |
Features | Not applicable. |
Page Tasks | Not applicable. |
Permissions | Not applicable. |
POST /{version}/?id={url}&scrape=true HTTP/1.1 Host: graph.facebook.com
{ "success": true }
Include the following query string parameters to augment the request.
Parameter | Description |
---|---|
Required string | An access token. |
string | A comma-separated list of fields you want to request. |
Required string | The url to be updated. The url must be encoded so that it does not interfere with the |
Required boolean | Value must be |
POST /{version}/?id={url}&scrape=true Host: graph.facebook.com
{ "success": true }
You can't perform this operation on this endpoint.