‎This document refers to an outdated version of Graph API.‎ ‎Please ‎use the latest version.‎
‎Graph API Version‎

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_events permission 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.

Learn more about Login Review

קריאה

An event

דוגמאות

Graph API Explorer
GET /v2.1/{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
}];
‎If you want to learn how to use the Graph API, read our ‎Using Graph API guide‎‎.

פרמטרים

‎This endpoint doesn't have any parameters.‎

‎Fields‎

‎Field‎תיאור

id

numeric string

The event ID

attending_count

int32

Number of people attending the event

can_guests_invite

bool

Can guests invite friends

cover

Cover picture

declined_count

int32

Number of people who declined the event

description

string

Long-form description

end_time

string

End time, if one has been set

feed_targeting

News feed targeting data

‎Deprecated‎

guest_list_enabled

bool

Can see guest list

interested_count

int32

Number of people interested in the event

invited_count

int32

Number of people invited to the event

‎Deprecated‎

is_date_only

bool

Whether the event only has a date specified, but no time

ברירת מחדל‎Deprecated‎

is_page_owned

bool

Whether the event is created by page or not

is_viewer_admin

bool

Whether the viewer is admin or not

location

string

Event location

ברירת מחדל‎Deprecated‎

maybe_count

int32

Number of people who maybe going to the event

name

string

Event name

noreply_count

int32

Number of people who did not reply to the event

owner

The profile that created the event

parent_group

The group the event belongs to

privacy

string

Who can see the event

ברירת מחדל‎Deprecated‎

start_time

string

Start time

ticket_uri

string

The link users can visit to buy a ticket to this event

timezone

enum

Timezone

updated_time

datetime

Last update time

venue

Venue hosting the event

ברירת מחדל‎Deprecated‎

קצוות

‎Edge‎תיאור

admins

Users that are admins of the event

attending

Users attending the event

comments

Comments on the event

declined

Users who declined the event invitation

interested

Users interested in the event

invited

Users invited to the event

maybe

Users who replied "maybe" to the event invitation

noreply

Users who have not replied to the event invitation

photos

Photos published to the event

picture

Profile picture

videos

Videos published to the event

feed

The feed of posts (including status updates) and links published to this event's wall.

‎Validation Rules‎

‎Error‎‎Description‎
100Invalid parameter
110Invalid user id
210User not visible

יצירה

‎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‎
100Invalid parameter
296Managing events requires the extended permission create_event

‎Updating‎

‎You can't perform this operation on this endpoint.‎

‎Deleting‎

‎You can't perform this operation on this endpoint.‎