Get fields and edges on an Event.
For Events on an App:
For Events on a Group:
GET /v24.0/{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(
'/{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(
"/{event-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{event-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:@"/{event-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];| Field | Description |
|---|---|
idnumeric string | The event ID |
int32 | Number of people attending the event |
can_guests_invitebool | Can guests invite friends. Requires an access token of an Admin of the Event |
enum {CLASSIC_LITERATURE, COMEDY, CRAFTS, DANCE, DRINKS, FITNESS_AND_WORKOUTS, FOODS, GAMES, GARDENING, HEALTH_AND_MEDICAL, HEALTHY_LIVING_AND_SELF_CARE, HOME_AND_GARDEN, MUSIC_AND_AUDIO, PARTIES, PROFESSIONAL_NETWORKING, RELIGIONS, SHOPPING_EVENT, SOCIAL_ISSUES, SPORTS, THEATER, TV_AND_MOVIES, VISUAL_ARTS} | The category of the event |
cover | Cover picture |
created_timedatetime | created_time |
int32 | Number of people who declined the event |
descriptionstring | Long-form description |
discount_code_enabledbool | Is discount code enabled for this event |
end_timestring | End time, if one has been set |
event_timeslist<ChildEvent> | Array of times of a multi-instance event |
guest_list_enabledbool | Can see guest list. Requires an access token of an Admin of the Event |
int32 | Number of people interested in the event |
is_canceledbool | Whether or not the event has been marked as canceled |
is_draftbool | Whether the event is in draft mode or published. Requires an access token of an Admin of the Event |
is_onlinebool | Whether the event is online or not. Required to pass the 'address' (city name) parameter for online events. |
is_page_ownedbool | Whether the event is created by page or not |
int32 | Number of people who maybe going to the event |
namestring | Event name |
int32 | Number of people who did not reply to the event |
online_event_formatenum {messenger_room, third_party, fb_live, horizon_event, other, none} | Type of online event - Live, Link or Other |
online_event_third_party_urlstring | Third party streaming url associated with Link events |
owner | The profile that created the event |
Event Place information | |
scheduled_publish_timestring | Time when event is scheduled to be published |
start_timestring | Start time |
ticket_uristring | The link users can visit to buy a ticket to this event |
ticket_uri_start_sales_timestring | Time when tickets go on sale |
ticketing_privacy_uristring | URI to seller's privacy policy for ticket purchases |
ticketing_terms_uristring | URI to seller's terms of service for ticket purchases |
timezoneenum | Timezone |
enum {private, public, group, community, friends, work_company, messenger_community} | The type of the event |
updated_timedatetime | Last update time (ISO 8601 formatted) |
| Edge | Description |
|---|---|
Edge<Profile> | List of profiles having roles on the event. Requires an access token of an Admin of the Event |
Edge<EventTicketTier> | List of ticket tiers. Requires an access token of an Admin of the Event |
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |
| 190 | Invalid OAuth 2.0 Access Token |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
| 104 | Incorrect signature |