Unity SDK

Facebook SDK for Unity Reference

Updated: Apr 17, 2026
This document provides the API details for the Facebook SDK for Unity.
The architecture follows, as much as possible within the constraints of the supported platforms, the design of the Javascript SDK. All functions implementing I/O operations are asynchronous and take a delegate as an argument which will be called with their output once it is ready.
Most data exchanged over the network is marshalled as strings containing JSON, and a utility class, Json, is provided to help manage that data within Unity.
Note: The Facebook SDK for Unity works with Unity 5.0 and above.

Core Methods

Name Description
Initialize the SDK, this is required before doing anything else
Make an API call to the Graph API
Trigger a Share dialog for one-to-many sharing
Trigger the legacy Feed sharing dialog, only use if you need legacy parameters
Trigger a Game Request dialog for one-to-one sharing
Get the URL with which the app was invoked

Facebook Login

Name Description
Prompt a user to authorize your app with requested read permissions, or to grant additional read permissions
Prompt a user to authorize your app with publish permissions, or to grant additional permissions
Log a user entirely out of Facebook

Express Login

Name Description
Retrieves the login status of the user.

Session Properties

Name Description
The access token granted to your application by the current user
Check whether the SDK has been initialized
Check whether a user is currently logged in and has authorized your app
Check whether a user is currently logged in and has authorized your app

App Events

Name Description
Signal an app launch or resume, for integrating with App Ads and Facebook Analytics for Apps
Publish an App Event, for deeper integration with App Ads and Facebook Analytics for Apps
Convience method for publishing purchase events, for deeper integration with App Ads and Facebook Analytics for Apps

Mobile-only

Name Description
Updates the current access token with up-to-date permissions, and extends the expiration date if possible
Open an App Invite dialog, giving users the ability to send their friends a personal invite to your app
Fetch deferred applink data from App Ads or invites
Set the preferred dialog type when using FB.ShareLink

Canvas-only Methods

Name Description
Prompt the user to make a payment using Facebook Payments

Auxiliary Methods

Name Description
Prompt user to create a new Game Group
Prompt user to join a Game Group

Other References

SDK Examples

Examples for the several common scenarios with the Facebook SDK for Unity

Using JSON with Unity

JSON is widely-used for data interchange; we can help you use it with Unity