Enable social features to enhance player engagement by allowing them to share, join communities, invite friends, and more.
Share
Use this to allow players to share game content or achievements on social media platforms.
bridge.social.isShareSupported
Check if the share functionality is supported on the platform.
let options = { }
switch (bridge.platform.id) {
case 'vk':
options = {
link: 'YOUR_LINK'
}
break
case 'facebook':
options = {
image: 'A base64 encoded image to be shared',
text: 'A text message to be shared.',
}
case 'msn':
options = {
title: 'A title to display',
image: 'A base64 encoded image or image URL to be shared',
text: 'A text message to be shared.',
}
break
}
bridge.social.share(options)
.then(() => {
// success
})
.catch(error => {
// error
})
Join Community
Enable players to join social communities related to your game, enhancing engagement and loyalty.
bridge.social.isJoinCommunitySupported
Check if the join community functionality is supported on the platform.