Event
Event
Represents a Facebook event. The /{event-id} node returns a single event.
Permissions
- Any access token can be used to retrieve events with privacy set to OPEN.
- A user access token with
user_eventspermission can be used to retrieve any events that are visible to that person. - An app or page token can be used to retrieve any events that were created by that app or page.
Login Review: user_events
To use the user_events permission you need to submit your app for review.
Reading
An event
Permissions
Developers usually request these permissions for this endpoint:Marketing Apps
ads_managementmanage_pagespages_show_list
manage_pagespages_show_list
Examples
GET /v2.9/{event-id} HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
$session,
'GET',
'/{event-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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();// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* 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
}];Parameters
Fields
| Field | Description |
|---|---|
numeric string | The event ID |
int32 | Number of people attending the event |
bool | Can guests invite friends |
bool | Whether a user has permission to post on the event timeline |
string | The category of the event |
| Cover picture |
int32 | Number of people who declined the event |
string | Long-form description |
string | End time, if one has been set |
bool | Can see guest list |
int32 | Number of people interested in the event |
bool | Whether or not the event has been marked as canceled |
bool | Whether the event is in draft mode or published |
bool | Whether the event is created by page or not |
bool | Whether the viewer is admin or not |
int32 | Number of people who maybe going to the event |
string | Event name |
int32 | Number of people who did not reply to the event |
| The profile that created the event |
| The group the event belongs to |
Event Place information | |
string | Start time |
string | The link users can visit to buy a ticket to this event |
string | URI to seller's privacy policy for ticket purchases |
string | URI to seller's terms of service for ticket purchases |
enum | Timezone |
enum {private, public, group, community} | The type of the event |
datetime | Last update time (ISO 8601 formatted) |
Edges
| Edge | Description |
|---|---|
Users that are admins of the event | |
Users attending the event | |
Comments on the event | |
Users who declined the event invitation | |
Users interested in the event | |
Live videos published to the event | |
Users who replied "maybe" to the event invitation | |
Users who have not replied to the event invitation | |
Photos published to the event | |
Profile picture | |
List of profiles having roles on the event | |
Videos published to the event | |
The feed of posts (including status updates) and links published to this event's wall. |
Validation Rules
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |
Creating
You can't perform this operation on this endpoint.
You may perform a POST request to the following edges from this node:Validation Rules
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |