Graph API Version

Achievement Type /{achievement-type-id}

A games achievement type created by a Facebook App. Not to be confused with an instance of an achievement.

Reading

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

Permissions

  • An app access token is required to view any achievement type created by that app.

Fields

NameDescriptionType

id

ID of the achievement type

string

type

The value will be games.achievement

string

title

Title of achievement

string

url

Unique URL of the achievement

string

description

Description of the achievement

string

image

Image for the achievement

object

url

Location of the achievement image

string

width

Pixel width of the image

int

height

Pixel height of the image

int

data

An object containing the points this achievement is worth.

object

points

Number of points that this achievement is worth. Total points per game may not exceed 1000 points limit, which is enforced

int

updated_time

Time when the achievement was last updated

datetime

created_time

Time when the achievement was created

datetime

application

The app that created the achievement.

App

context

Context of the achievement for the associated app

array containing the display_order

is_scraped

Whether the URL containing the achievement metadata has been scraped by Facebook servers.

bool

Publishing and Updating

Achievement types should be created using the /{app-id}/achievements edge.

You should update existing achievement types by updating the meta tags on the achievement's URL, and then forcing a re-scrape.