Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
    • Social Design
    • Social Plugins
    • Open Graph
    • Social Channels
    • Authentication
    • Graph API
  • Advanced Topics
  • SDK Reference
  • Tools
  • Concepts
    • Batch Requests
    • Permissions
    • Real-time Updates
  • Objects
    • Achievement(Instance)
    • Album
    • Application
    • Checkin
    • Comment
    • Domain
    • Event
    • FriendList
    • Group
    • Insights
    • Link
    • Message
    • Note
    • Offer
    • Order
    • Page
    • Photo
    • Post
    • Question
    • QuestionOption
    • Review
    • Status message
    • Thread
    • User
    • Video

Event

Core Concepts › Graph API › Event

Specifies information about an event, including the location, event name, and which invitees plan to attend. The User, Page, and Application objects have an events connection.

To read an Event, you need one of the following:

  • no access token if the event is public
  • a user access token for a user who can see the event if it has restricted visibility
  • an app access token for the app that created the event
  • a page access token for the page that created the event

Starting July 5th, an access token will be required to access even public events. To read an Event, you will need one of the following:

  • a user access token for a user who can see the event
  • an app access token (for non-public events, must be the app that created the event)
  • a page access token (for non-public events, must be the page that created the event)

To read the /events connection of a User, you need:

  • the user_events permission for the current user
  • the friends_events permission for a friend of the current user

Example

The Facebook Developer Garage Austin Event:

https://graph.facebook.com/331218348435


Fields

NameDescriptionPermissionsReturns
id

The event ID

generic access_token, user_events or friends_events

string

owner

The profile that created the event

generic access_token, user_events or friends_events

object containing id and name fields

name

The event title

generic access_token, user_events or friends_events

string

description

The long-form description of the event

generic access_token, user_events or friends_events

string

start_time

The start time of the event, as you want it to be displayed on facebook

generic access_token, user_events or friends_events

string containing an ISO-8601 formatted date/time or a UNIX timestamp; if it contains a time zone (not recommended), it will be converted to Pacific time before being stored and displayed

end_time

The end time of the event, as you want it to be displayed on facebook

generic access_token, user_events or friends_events

string containing an ISO-8601 formatted date/time or a UNIX timestamp; if it contains a time zone (not recommended), it will be converted to Pacific time before being stored and displayed

location

The location for this event

generic access_token, user_events or friends_events

string

venue

The location of this event

generic access_token, user_events or friends_events

object containing one or more of the following fields: id, street, city, state, zip, country, latitude, and longitude fields

privacy

The visibility of this event

generic access_token, user_events or friends_events

string containing 'OPEN', 'CLOSED', or 'SECRET'

updated_time

The last time the event was updated

generic access_token, user_events or friends_events

string containing ISO-8601 date-time


Connections

NameDescriptionPermissionsReturns
feed

This event's wall.

any valid access_token, user_events or friends_events

An array of Post objects.

noreply

All of the users who have been not yet responded to their invitation to this event.

any valid access_token, user_events or friends_events

array containing objects with id, name and rsvp_status fields.

invited

All of the users who have been invited to this event.

any valid access_token, user_events or friends_events

array containing objects with id, name and rsvp_status fields.

attending

All of the users who are attending this event.

any valid access_token, user_events or friends_events

array containing objects with id, name and rsvp_status fields.

maybe

All of the users who have been responded "Maybe" to their invitation to this event.

any valid access_token, user_events or friends_events

array containing objects with id, name and rsvp_status fields.

declined

All of the users who declined their invitation to this event.

any valid access_token, user_events or friends_events

array containing JSON objects with id, name and rsvp_status fields.

picture

The event's profile picture.

any valid access_token, user_events or friends_events

Returns a HTTP 302 with the URL of the event's picture (use ?type=small | normal | large to request a different photo).

videos

The videos uploaded to an event.

valid user access_token

array of Video objects.


feed

This connection corresponds to the Event's wall. You can create a link, post or status message by issuing an HTTP POST request to the EVENT_ID/feed connection.

links

Create

You can post a link on the event's wall by issuing an HTTP POST request to EVENT_ID/feed with the publish_stream permissions and the following parameters.

Parameter Description Type Required
link Link URL string yes
message Link message string no

The other fields are taken from the metadata of the page URL given in the 'link' param.

If the create is successful, you get the following return.

Name Description Type
id The new link ID string

posts

Create

You can create a post on an Event's wall by issuing an HTTP POST request to EVENT_ID/feed with the publish_stream permissions and the following parameters.

Parameter Description Type Required
message Post message string either message or link
link Post URL string either message or link
picture Post thumbnail image (can only be used if link is specified) string no
name Post name (can only be used if link is specified) string no
caption Post caption (can only be used if link is specified) string no
description Post description (can only be used if link is specified) string no
actions Post actions array of objects containing name and link no

If the create is successful, you get the following return.

Name Description Type
id The new post ID string

statuses

create

You can post a status message on an Event's wall by issuing an HTTP POST request to EVENT_ID/feed with the publish_stream permissions and the following parameters.

Parameter Description Type Required
message Status Message content string yes

If the create is successful, you get the following return.

Name Description Type
id The new status message ID string

invited

Create

You can invite users to an event by issuing an HTTP POST to /EVENT_ID/invited/USER_ID. You can invite multiple users by issuing an HTTP POST to /EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3. Both of these require the create_event permission and return true if the invite is successful.

Read

You can read the list of invitees for an event by issuing an HTTP GET to /EVENT_ID/invited:

https://graph.facebook.com/331218348435/invited

You can check whether a specific user has been invited to an event by issuing an HTTP GET to /EVENT_ID/invited/USER_ID:

https://graph.facebook.com/331218348435/invited/2503747

You'll need the user_events or friend_events permissions to view the invite list for for non-public events.

These calls return an object with the name, id, and rsvp_status ('not_replied', 'unsure', 'attending', or 'declined') fields. When checking for a specific user, if the user is not invited to the event, the API will return an empty data array.

Delete

You can un-invite a user from an event by issuing an HTTP DELETE to /EVENT_ID/invited/USER_ID. Returns true if the request is successful. The user must be an admin (i.e. creator) of the event for this call to succeed. Requires rsvp_event permission.


attending

Create

You can RSVP the user as 'attending' an Event by issuing an HTTP POST to EVENT_ID/attending. This requires the rsvp_event permission and returns true if the RSVP is successful, and false otherwise.

Read

You can which users are 'attending' an event by issuing an HTTP GET to /EVENT_ID/attending This returns a list of all users who responded 'yes' to the event:

https://graph.facebook.com/331218348435/attending

You can check if a specific user responded 'yes' to an event by issuing an HTTP GET to /EVENT_ID/attending/USER_ID. These operations require the user_events or friends_events permissions for non-public events and return an array of objects with the name, id, and rsvp_status fields. When checking a single user, an empty data will be returned if the user did not respond 'yes' to the event.


maybe

Create

You can RSVP the user as a 'maybe' for an Event by issuing an HTTP POST to EVENT_ID/maybe. This requires the rsvp_event permission and returns true if the RSVP is successful, and false otherwise.

Read

You can which users have replied 'maybe' to an event by issuing an HTTP GET to /EVENT_ID/maybe This returns a list of all users who responded 'maybe' to the event:

https://graph.facebook.com/331218348435/maybe

You can check if a specific user responded 'maybe' to an event by issuing an HTTP GET to /EVENT_ID/maybe/USER_ID. These operations require the user_events or friends_events permissions for non-public events and return an array of objects with the name, id, and rsvp_status fields. When checking a single user, an empty data will be returned if the user did not respond 'maybe' to the event.


declined

Create

You can RSVP the user as 'declined' for an Event by issuing an HTTP POST to EVENT_ID/declined. This requires the rsvp_event permission and returns true if the RSVP is successful, and false otherwise.

Read

You can which users are declined an event (i.e. responded 'no') by issuing an HTTP GET to /EVENT_ID/declined This returns a list of all users who responded 'no' to the event:

https://graph.facebook.com/331218348435/declined

You can check if a specific user responded 'no' to an event by issuing an HTTP GET to /EVENT_ID/declined/USER_ID. These operations require the user_events or friends_events permissions for non-public events and return an array of objects with the name, id, and rsvp_status fields. When checking a single user, an empty data will be returned if the user did not respond 'no' to the event.


noreply

Read

You can which users have not replied to an event by issuing an HTTP GET to /EVENT_ID/noreply This returns a list of all users who have not replied to the event:

https://graph.facebook.com/331218348435/noreply

You can check if a specific user has not replied to an event by issuing an HTTP GET to /EVENT_ID/noreply/USER_ID. These operations require the user_events or friends_events permissions for non-public events and return an array of objects with the name, id, and rsvp_status fields. When checking a single user, an empty data will be returned if the user did reply to the event.


photos

Read

You can read the photos published to an event by issuing an HTTP GET request to /EVENT_ID/photos with a user access_token.

The API returns an array of photo objects.

Create

You can post photos to an Event's Wall by issuing an HTTP POST request to EVENT_ID/photos with the publish_stream permission and the following parameters.

Parameter Description Type Required
source Photo content multipart/form-data yes
message Photo description string no

If the create is successful, you get the following return.

Name Description Type
id The new photo ID string

videos

Read

You can read the videos published to an event by issuing an HTTP GET request to /EVENT_ID/videos with a user access_token.

The API returns an array of video objects.

Create

You can publish a video to an event by issuing an HTTP POST request to https://graph-video.facebook.com/EVENT_ID/videos with a user access_token and the following parameters:

Parameter Description Type Required
source Video content multipart/form-data yes
title Video title string no
description Video description string no

If the create is successful, you get the following return.

Name Description Type
id The new video ID string
Updated about a month ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy