Skip to main content

Facebook Friends

Configure

This feature requires Facebook Authorization. Configuration by using the Unity Settings Inspector.

iOS

Fill the following field in the settings inspector, please (ask your release manager for those parameters):

  • App Name - application name
  • Facebook App Id - id of your project on Facebook

Android

Fill the following fields in the settings inspector, please (ask your release manager for those parameters):

  • Facebook App Id - id of your project on Facebook
  • Facebook Provider App Id - provider (read more)

Usage

Get Social Friends

To get the friends list use:

P101XP.GetInstance().GetSocialFriends();

The result of the method GetSocialFriends() is passed to event handler.

Event

To get the purchase result, please, subscribe on:

private void GetSocialFriendsHandler(FriendsContainer friendsContainer)
{
}

P101XP.GetInstance().SocialFriendsEvent += SocialFriendsHandler;

FriendsContainer

var namedescription
friends_listThe social friend list who plays in this game
error_messageerror message or null

SocialFriend

var namedescription
levelthe player game level
mobile_idthe 101XP mobile ID
namethe friend name
picture_urlthe social network picture url
social_net_idthe social network id