Graph API Version
v2.7

# Achievement `/{achievement-id}`

Represents a user gaining an achievement in a Facebook game. Not to be confused with an achievement type.

## Reading

Graph API Explorer

    GET /v2.7/{achievement-id} HTTP/1.1
    Host: graph.facebook.com

    /* PHP SDK v5.0.0 */
    /* make the API call */
    $request = new FacebookRequest(
      $session,
      'GET',
      '/{achievement-id}'
    );
    $response = $request->execute();
    $graphObject = $response->getGraphObject();
    /* handle the result */

    /* make the API call */
    FB.api(
        "/{achievement-id}",
        function (response) {
          if (response && !response.error) {
            /* handle the result */
          }
        }
    );

    /* make the API call */
    new GraphRequest(
        AccessToken.getCurrentAccessToken(),
        "/{achievement-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:@"/{achievement-id}"
                                          parameters:params
                                          HTTPMethod:@"GET"];
    [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                          id result,
                                          NSError *error) {
        // Handle the result
    }];

### Permissions

- An app access token for any achievements made through that app.
- A user access token for any achievements made through the requesting app by that user.
- A user access token with `user_games_activity` permission, for any achievements that person has made in any app.

### Fields

Name | Description | Type
--- | --- | ---
`id` | ID of this particular achievement. | `string`
`from` | The user who achieved this. | `User`
`publish_time` | Time at which this was achieved. | `datetime`
`application` | The app in which the user achieved this. | `App`
`data` | Information about the achievement type this instance is connected with. | `object`
`achievement` | The achievement type that the user achieved. | `AchievementType`
`importance` | A weighting given to each achievement type by the app. | `int`
`type` | Always `game.achievement`. | `string`
`no_feed_story` | Indicates whether gaining the achievement published a feed story for the user. | `boolean`

## Publishing

You can publish achievements by using the `/{user-id}/achievements` edge.

## Deleting

You can delete achievements by using the `/{user-id}/achievements` edge.

## Edges

Name | Description
--- | ---
`/comments` | Comments on the achievement story.
`/likes` | Likes on the achievement story.

- English (UK)
- English (US)
- Español
- Français (France)
- Italiano
- 中文(简体)
- Português (Brasil)