Event
Represents a Facebook event. The /{event-id} node returns a single event.
user_events permission can be used to retrieve any events that are visible to that person.user_eventsTo use the user_events permission you need to submit your app for review.
An event
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
}];| Field | תיאור |
|---|---|
numeric string | The event ID |
int32 | Number of people attending the event |
bool | Can guests invite friends |
| Cover picture |
int32 | Number of people who declined the event |
string | Long-form description |
string | End time, if one has been set |
| News feed targeting data Deprecated |
bool | Can see guest list |
int32 | Number of people interested in the event |
int32 | Number of people invited to the event Deprecated |
bool | Whether the event only has a date specified, but no time ברירת מחדלDeprecated |
bool | Whether the event is created by page or not |
bool | Whether the viewer is admin or not |
string | Event location ברירת מחדלDeprecated |
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 |
string | Who can see the event ברירת מחדלDeprecated |
string | Start time |
string | The link users can visit to buy a ticket to this event |
enum | Timezone |
datetime | Last update time |
| Venue hosting the event ברירת מחדלDeprecated |
| Edge | תיאור |
|---|---|
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 | |
Users invited 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 | |
Videos published to the event | |
The feed of posts (including status updates) and links published to this event's wall. |
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 110 | Invalid user id |
| 210 | User not visible |
You can't perform this operation on this endpoint.
You may perform a POST request to the following edges from this node:| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 296 | Managing events requires the extended permission create_event |