Upgrading to 7.10.1

No special steps are required to upgrade to 7.10.1.

Upgrading to 7.10.0

Upgrade to at least version 5.6 of unity.

Upgrading to 7.9.4

No special steps are required to upgrade to 7.9.4.

Upgrading to 7.9.0

Upgrade to at least version 5.4.1p3 of unity https://unity3d.com/unity/qa/patch-releases/5.4.1p3

Upgrading to 7.8.0

No special steps are required to upgrade to 7.8.0.

Upgrading to 7.7.0

No special steps are required to upgrade to 7.7.0.

Upgrading to 7.6.0

No special steps are required to upgrade to 7.6.0.

Upgrading to 7.5.0

When running on WebGL or WebPlayer the RawResult for IResult has changed. The Orgitional RawResult field may now be nested under a 'response' key in the returned json object.

Upgrading to 7.4.0

No special steps are required to upgrade to 7.4.0.

Upgrading to 7.3.0

In this release the files for the SDK have moved to a new location in order to enable easier updates compatible with the Unity's plugin management.

When upgrading, please delete the following folders and files prior to importing the latest SDK package.

  • 'Assets/Facebook'
  • 'Assets/Example'
  • 'Assets/Plugins/iOS/Facebook'
  • 'Plugins/Android/libs/android-support-v4'
  • 'Plugins/Android/libs/bolts-android-1.2.0'
  • 'Plugins/Android/libs/facebook-android-sdk-4.7.0'
  • 'Plugins/Android/libs/facebook-android-wrapper-release'

Upgrading to 7.2.2

No special steps are required to upgrade to 7.2.2.

Upgrading to 7.2.1

No special steps are required to upgrade to 7.2.1.

Upgrading to 7.2.0

FB.API now targets v2.5 of the Graph API by default. In order to prepare for this change remove any explicit versioning in Graph API calls. eg: change v2.2/me/picture to me/picture

Unity SDK, Upgrading from 6.x to 7.x

The Facebook SDK for Unity v7.1.0 is a major version upgrade which features:

  • Improved login programming model, and access token class.
  • Improved sharing programming model, and more ways to share without needing an access token.
  • Improved callback handling.
  • New features like App Invites

Install and Setup Updates

Requirements:

  • The Unity SDK now requires Unity 5.0 or above.
  • The Unity SDK now requires a minimum Android SDK of API level 15 or above.
  • The Unity SDK now requires a minimum iOS target of 7.0 or above.

When Updating:

  • We recommend you clean out older versions of the Facebook SDK for Unity from your project before importing v7.x
  • When upgrading from 6.x delete the following directories:
    • Assets/Facebook
    • Assets/Plugins/Android/facebook
    • Assets/Examples
  • When upgrading from a v7.x beta remove the following directories:
    • Assets/Facebook
    • Assets/Examples
    • In the Assets/Plugins/Android/libs/ directory, remove: android-support-v4.jar, bolts-android-1.2.0.jar, and facebook-android-*
    • In the Assets/Plugins/iOS/ directory, remove: Bolts.framework and FBSDK*
  • After cleaning out older versions of the SDK, we recommend you save your project and then close and restart the Unity Editor before continuing.

Setup:

  • Refer to the Getting Started guide for a list of steps to integrate the SDK into your Unity project.

Namespace Updates

  • The namespace for Facebook functions has changed in v7.x. Change the 'using' directive in your scripts to: using Facebook.Unity;

Platform Updates

Login Updates

Performing login, getting permissions:

Access tokens:

  • A new AccessToken class has been introduced in v7.x that allows you to retrieve the current access token and inspect the permissions of a logged-in player. UserId has moved into this class.

Method Updates

Sharing:

App Events:

  • No programming model changes. Use FB.LogAppEvent to log events taken in your app to get useful analytics. This includes app installs, time spent in your app and ad targeting.
  • Use FB.LogPurchase as a convenience method for logging purchase events.

App Links:

App Invites:

Typed Callbacks

  • FBResult has been replaced.

Method callbacks are now typed and have distinct result classes. For example: FB.API will return an IGraphResult and FB.Canvas.Pay will return an IPayResult. Refer to the call signature of each method to learn its result class.

Parsing callback results are simplified with the typed callbacks.

FB.API("/me?fields=first_name", HttpMethod.GET, delegate (IGraphResult result) {
  // Add error handling here
  if (result.ResultDictionary != null) {
    foreach (string key in result.ResultDictionary.Keys) {
      Debug.Log(key + " : " + result.ResultDictionary[key].ToString());
      // first_name : Chris
      // id : 12345678901234567
    }
  }
});