The BFC SDK comes equipped with a set of pre-built Big Fish Games experiences. They can be easily and quickly integrated into any Big Fish mobile game to provide a consistent experience for basic game personalization features like Player Login, and Player Profile Management.

Although these experiences by default reflect the look and feel of the Big Fish brand, they can be customized to fit the look and feel of individual games by changing the skin and layout of individual features.

See the Personalizing the Built-in Experiences section to find out how to personalize these experiences.

Player Login Experience#

The default Login experience allows the player to log in, and create a new gamer account via any of these methods:

  • Sign up with a new email address

  • Sign in with an email address associated with player’s Big Fish ID account

../_images/player_login_experience1.png

In order to integrate this scene it’s important that the Facebook and Google apps used in the Rave integration are properly configured. Please see Integrating Third Party Social Providers section for instructions on how to configure the social networks apps.

Sign up data is somtimes returned in certain regions for new users. See Getting COPPA or CASL Information from User Sign Up section for more on this.

To integrate the sign-up experience:

RaveSocial.ShowSignUpEmailScene(delegate(RaveCallbackResult result, BigFishSignUpData signUpData, string error) {
  if (result == RaveCallbackResult.RaveResultError) {
    // handle error
  } else if (result == RaveCallbackResult.RaveResultCanceled) {
    // handle canceled
  } else if (signUpData != null) {
    // handle the sign up data if needed (canada, us)
  } else if (result == RaveCallbackResult.RaveResultSuccessful) {
    // there is no sign up data returned for other regions
  }
});

To integrate the Login experience:

RaveSocial.ShowLoginScene(delegate(RaveCallbackResult result, BigFishSignUpData signUpData, string error) {
  // same as above
});

Registering and Handling Login Callbacks#

RaveSocial provides key Scene and Login status callbacks that a developer can register and listen to.

Login Status Notification#

The general Login Callback (not to be confused with the RaveLoginScene callback) is used to notify the developer that a login status change of some kind has occured. This is useful because it may indicate that some social features are now available.

RaveSocial.SetLoginStatusCallback(delegate(RaveLoginStatus status, string error) {
  if(status == RaveLoginStatus.RaveLoggedIn) {
    isLoggedIn = true;
    if(RaveSocial.IsLoggedInAsGuest()) {
      // respond to guest status
    } else {
      // respond to loggedIn status
      // at thish time you may also check different fields of the current user
      // by accessing RaveSocial.usersManager.current
    }
  } else if(status == RaveLoginStatus.RaveLoggedOut) {
    // respond to logging out
  } else {
    // respond to the error condition
  }
});

Directly Logging In to Authentication Providers#

If using the built-in Big Fish Login experiences is not desired, developer can build completely custom login experience using Rave’s login APIs.

Using our loginWith API, you can directly invoke a login via Facebook or Google. Please use the following constants:

  • RaveConstants.CONNECT_PLUGIN_FACEBOOK

  • RaveConstants.CONNECT_PLUGIN_GOOGLE

RaveSocial.LoginWith (RaveConstants.CONNECT_PLUGIN_FACEBOOK, delegate(bool loggedIn, string error) {
    //  result handler
});

Checking Readiness of Authentication Providers#

Just like with the direct login API - you can also see if an authentication provider is ready to be used. “Readiness” indicates that a user has connected this social account to their Rave Social account and also that the token or local authentication for this social account was successful. Call convenience functions in RaveSocial to check a plugin’s readiness. If a plugin is not ready but you desire a ready status, use the matching connect methods in RaveSocial to establish a connection with the the desired plugin.

RaveSocial.CheckReadinessOf (RaveConstants.CONNECT_PLUGIN_FACEBOOK, delegate(bool ready,string error) {
    // handle result
});

//  connecting to Facebook if it fails a readiness check
RaveSocial.ConnectTo (RaveConstants.CONNECT_PLUGIN_FACEBOOK, delegate(bool loggedIn,string error) {
    if (loggedIn) {
      // handle successful connection
    } else if (error != "") {
      // handle error
    } else {
      // otherwise the user cancelled the operation
    }
  }
});

Player Profile Management Experience#

The profile management experience screen allows players to build out their game profile by adding a profile picture, email, and display name, as well as connecting various social networks to connect with friends.

This screen will also have a link to login or sign-up if the user hasn’t done so already.

To integrate the Profile Management experience:

RaveSocial.ShowAccountInfoScene (delegate(RaveCallbackResult result, BigFishSignUpData signUpData, string error) {
  // handle any login or sign-up actions here
});

Find Friends Experience#

The Find Friends screen allows the player to connect their Facebook and Google accounts, and their local Phonebook to find friends who are also playing Big Fish games.

As the player connects his social network account to his gamer account, Rave will keep track of which of player’s friends are also playing Big Fish games and will add those friends to the list of player’s gamer contacts. These friends will be available in games for in-game interactions such as sending gifts to them and for social leaderboards.

../_images/find_friends_experience.png

To integrate the Find Friends experience:

RaveSocial.ShowFindFriendsScene (delegate(string error) {
  if(error != "") {
    // check for error
  }
});

Getting COPPA or CASL Information from User Sign Up#

If you are in the US region and need information about a new user’s COPPA compliance, or are in the Canadian region and need information about whether the user has accepted newsletter sign-up, this data can be checked by setting a callback on RaveAccountInfoScene, RaveLoginScene and RaveSignUpEmailScene. Note that signUpData can be returned as null in certain situations.

The newsletter name for sign up can be set in the setting BigFishSettings.General.NewsletterName

An example usage:

RaveSocial.ShowAccountInfoScene (delegate(RaveCallbackResult result, BigFishSignUpData signUpData, string error) {
  if (result == RaveCallbackResult.RaveResultError) {
    // handle error
  }
  if (signUpData == null) {
    // no sign up data (maybe it was cancelled)
  } else {
    // For Canada:
      // signUpData.acceptedNewsletter tells you if the user opted-in to receive newsletter
    // For US:
      // signUpData.passedCoppaCheck tells you if the user's age is COPPA Compliant
      // signUpData.birthYear will contain the user's year of birth
  }
});