Facebook Friends
Configure
This feature requires Facebook Authorization
Usage
To get friends list from Facebook social network you should implement p101xpOnGetSocialFriendsResult method:
- (void)p101xpOnGetSocialFriendsResult:(NSArray<P101XPSocialFriend *> *)socialFriends error:(P101XPError *)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
}
}
Platform101XPSocialFriend 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:
Platform101XP.getSocialFriends(Platform101XPSNManager.Type.FACEBOOK);