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 name | description |
---|---|
friends_list | The social friend list who plays in this game |
error_message | error message or null |
SocialFriend
var name | description |
---|---|
level | the player game level |
mobile_id | the 101XP mobile ID |
name | the friend name |
picture_url | the social network picture url |
social_net_id | the social network id |