The Life Event node part of the data returned for a Page's milestone edge.
Access to a person's 'Born' life event requires the user_birthday
permission.
Page milestone information
GET /v5.0/{life-event-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(
'/{life-event-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(
"/{life-event-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{life-event-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{life-event-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Field | Description |
---|---|
id numeric string | The milestone ID |
description string | Description of the milestone |
end_time datetime | The time when this milestone came to an end |
from | The information of the Page that ownes the milestone |
is_hidden bool | Whether the milestone is hidden or not |
start_time datetime | The time when this milestone was started |
title string | The title of the milestone |
updated_time datetime | The time when this milestone was updated |
Edge | Description |
---|---|
Comments on this milestone | |
Likes on this milestone | |
Photos attached with this milestone | |
Shared posts |
Error | Description |
---|---|
100 | Invalid parameter |