Graph API Version

User Promotable Events

Reading

All the events which user can promote.

Graph API Explorer
GET /v2.10/{user-id}/promotable_events HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{user-id}/promotable_events'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{user-id}/promotable_events",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/promotable_events",
    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:@"/{user-id}/promotable_events"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Parameters

NameDescription
include_past_events
boolean

If true, will return past events as well.

is_page_event
boolean

If kept as false, only events owned by the user are returned. If set to true, events owned by pages that the user admins.

page_id
int64

used with 'is_page_event' field to return events given specific page_id

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of Event nodes.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
278Reading advertisements requires an access token with the extended permission ads_read
100Invalid parameter
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.