How to install facebook sdk for iOS using cocoapods? How to install facebook sdk for iOS using cocoapods? objective-c objective-c

How to install facebook sdk for iOS using cocoapods?


Facebook-iOS-SDK has been deprecated (see the message cocoapods give you when you use pod install).

According to Facebook You should use:

pod "FBSDKCoreKit";pod "FBSDKLoginKit";pod "FBSDKShareKit";pod "FBSDKMessengerShareKit";


Changing the pod link to

pod "Facebook-iOS-SDK"

solved it why do they put \' in documentation is the question now?

EDIT: This answer is now outdated. The correct way to install facebook Pod is as @aramusss described above.


You can implement the frameworks in the Facebook SDK for iOS by adding the framework project files to your project workspace and then building your project. Adding the project files to your workspace is a way to use the Facebook SDK if you have trouble using Swift Package Manager or CocoaPods.

Before You StartThis procedure assumes you are using the latest version of iOS and xCode.

You will need:

A Facebook Developer Account

An App ID for your app

Set Up Your Development Environment

  1. In Xcode, click File > Swift Packages > Add Package Dependency.
  2. In the dialog that appears, enter the repository URL: https://github.com/facebook/facebook-ios-sdk.enter image description here
  3. In Version, select Up to Next Major and the default option.enter image description here
  4. Complete the prompts to select the libraries you want to use in your project.

For more info, see https://developers.facebook.com/docs/ios/implement-sdk