The Places Graph SDK has been removed and will not work as of GraphAPI v6.0. This is due to the deprecation of the endpoints: GET /{place-information-id} and GET /search?type=place.

Places Graph SDK for Android

The Places Graph SDK functionalities are exposed through the PlaceManager class. This class exposes helper functions to construct GraphRequests configured for each the Places Graph API endpoints. The Places Graph functionality includes:

  • Searching for places
  • Estimating the current place where the device is located
  • Fetching information on a specified place
  • Providing feedback about the accuracy of the current place estimation
  • A Sample app

To utilize Places Graph features, you must configure your app to use Location Services, and you must also ensure that the user has enabled location services on their device.

For an example project that demonstrates how to integrate the Places Graph, see Places Graph Code Sample for Android.

For common issues encountered during integration, see the Places Graph FAQ.

To set up the Places Kit in your iOS app, follow these steps:

1. Prerequisites

Before you begin integrating the Places Graph into your app, make sure you have completed the following prerequisites.

A. Create a Developer Account

If you don't have a Facebook developer account, create one by clicking the button below.

Your Facebook developer account gives you access to developer tools and allows you to create Facebook apps.

Already have a Facebook developer account? Then skip to the next step.

Create Developer Account

B. Get a Facebook App ID

The Places Graph SDK for Android requires a Facebook app ID. Follow the steps in the Getting Started, or to use Quick Start, click the button below.

Quick Start for Android

C. Choose Your App Settings

Choose security settings for your app. For more information on choosing your acesss token setting, see Places Graph Access.

Choose Your App Settings

D. Add the Facebook Places SDK for Android

The Places SDK for Android is a component of the Facebook SDK for Android. To use the Facebook Places SDK in your project, make it a dependency in Maven, or download it. Choose the method you prefer with the following button.

Link the SDK with Maven

  1. In your project, open your_app | Gradle Scripts | build.gradle (Project) and add the following repository to the buildscript { repositories {}} section to download the SDK from the Maven Central Repository:
  2. In your project, open your_app | Gradle Scripts | build.gradle (Module: app) and add the following compile statement to the dependencies{} section to compile the latest version of the SDK:
    compile '[4,5)'
  3. Build your project.

Download the SDK

To download the SDK, click the following button.

Download SDK

When you use the Facebook Places SDK, events in your app are automatically logged and collected for Facebook Analytics unless you disable automatic event logging. For details about what information is collected and how to disable automatic event logging, see Automatic App Event Logging.

2. Using a Client Token for Android

You can use the Places Graph SDK with two different types of access tokens.

Token TypeDescription

User Access Token

This kind of access token is needed whenever the app calls an API to read, modify, or write a specific person's Facebook data on their behalf. User access tokens are generally obtained via a login dialog, and they require a person to permit your app to obtain one.

Client Token

This kind of access token is fixed, and is unique to each application. Using a client token does not require users to log into Facebook. You can retrieve your Application Client Token from the

Developer Portal

. From the All Apps page, select your app, then click Settings > Advanced.

  • Logged-out users can execute up to 500 requests per day for a given IP.
  • Logged-in users can execute up to 200 requests per hour.

The Places Graph SDK automatically selects the access token when a new request is created. If a user access token is available, it will be used; otherwise, the client token is used.

The following code example demonstrates how to set the Client Token.

// Get your client token from the developer portal.
String CLIENT_TOKEN = "{your_client_token}";

// At this point, requests on PlaceManager can be invoked. 
// Users do not have to log in Facebook.

For more information on access tokens, see Access Tokens.