Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/facebook/facebook-ios-sdk/llms.txt

Use this file to discover all available pages before exploring further.

The SDK supports three package managers. Choose the one that matches your project’s tooling. You only need to add the modules your app uses — you don’t have to include the entire SDK.
All modules require FacebookCore (or FBSDKCoreKit in CocoaPods/Carthage) as a transitive dependency. You don’t need to add it explicitly when installing other modules.
Swift Package Manager is the recommended approach for new projects.
1

Open the package dependency dialog

In Xcode, choose File → Add Package Dependencies.
2

Enter the repository URL

Paste the following URL into the search field:
https://github.com/facebook/facebook-ios-sdk
Select the repository from the results and choose a version rule. Use Up to Next Major Version starting from 18.0.3 to receive non-breaking updates automatically.
3

Select the modules you need

Xcode will list the available package products. Add only the ones your app requires:
ProductUse when you need
FacebookCoreApp events, Graph API, access tokens
FacebookLoginFacebook Login
FacebookShareShare and message dialogs
FacebookGamingServicesGaming integrations
FacebookAEMAggregated Event Measurement
Click Add Package.
4

Import in your source files

Import the modules you added at the top of each Swift file that uses them:
import FacebookCore
import FacebookLogin

Next steps

Once the SDK is installed, follow the Quickstart to configure your app ID and initialize the SDK.

Build docs developers (and LLMs) love