Skip to main content
Version: 1.51.x

Facebook Friends

Configure

This feature requires Facebook Authorization

Facebook Configure

Usage

To get friends list from Facebook social network you should implement p101xpOnGetSocialFriendsWithResult method:

- (void)p101xpOnGetSocialFriendsWithResult:(NSArray<P101XPSocialFriend *> *)result error:(NSError *)error  {
if ([[self socialFriends] count] == 0) {
// your implementation for social friends when array is equal "0"
return;
}
if (error == nil) {
// your implementation for show facebook friends

// example how to get mobile_id from social friends array bellow
NSLog(@"%@", socialFriends[0].mobileId);
} else {
// error handling
}
}

P101XPSocialFriend has getters:

friendName - the friend name

friendId - the social network id

pictureUrl - the social network picture url

mobileId - the 101XP mobile ID

level - the player game level

To get social friend result you should call method getSocialFriends:_ with type Facebook parameter for snType:

[P101XP getSocialFriends: P101XPSNTypeSnFacebook];