Graph API Version

App Request

Reading

An individual app request received by someone, sent by an app or another person

Please note: App requests which have not been opened by the recipient will be deleted after 21 days.

Example

Graph API Explorer
GET /v5.0/{app-request-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{app-request-id}',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{app-request-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{app-request-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:@"/{app-request-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.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription
id
token with structure: ID or ID or ID

The ID of an individual request

action_type
string

Request action type for structured request

application

The app used to send the request

created_time
datetime

Timestamp when the request was sent

data
string

Optional data passed with the request for tracking purposes

from

The user who sent the request. This is not present for app-to-user requests made with the Graph API

message
string

The message included with the request

to

The user who received the request

Validation Rules

ErrorDescription
100Invalid parameter
159Invalid protocol, must be https

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can delete an AppRequest by making a DELETE request to /{app_request_id}.

Parameters

ParameterDescription
ids
list<string>

IDs

Required

Return Type

Struct {
success: bool,
} Or Map {
string: bool
}

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
2004Sending of requests has been temporarily disabled for this application.