Social Interactions

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.

playgama_bridge_social_is_share_supported()

Check if the share functionality is supported on the platform.

var options
switch playgama_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.",
        }
        break
}

playgama_bridge_social_share(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_share_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_share_callback(success) {
	if success {
		// your logic
	}
}

Join Community

Enable players to join social communities related to your game, enhancing engagement and loyalty.

playgama_bridge_social_is_join_community_supported()

Check if the join community functionality is supported on the platform.

var options
switch playgama_bridge_platform_id() {
    case "vk":
	options = {
    	    "groupId": "YOUR_GROUP_ID"
        }
        break
    case "ok":
        options = {
    	    "groupId": "YOUR_GROUP_ID"
        }
        break
}

playgama_bridge_social_join_community(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_join_community_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_join_community_callback(success) {
	if success {
		// your logic
	}
}

Invite Friends

Allow players to invite their friends to play the game, helping to grow your player base organically.

playgama_bridge_social_is_invite_friends_supported()

Check if the invite friends functionality is supported on the platform.

var options
switch playgama_bridge_platform_id() {
    case "vk":
	options = {
    	    "text": "Hello World!"
        }
        break
    case "facebook":
        options = {
    	    "image": "A base64 encoded image to be shared",  
            "text": "A text message",
        }
        break
}

playgama_bridge_social_invite_friends(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_invite_friends_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_invite_friends_callback(success) {
	if success {
		// your logic
	}
}

Create Post

Use this to let players create posts about their achievements or updates directly from the game.

playgama_bridge_social_is_create_post_supported()

Check if the create post functionality is supported on the platform.

var options
switch playgama_bridge_platform_id() {
    case "ok":
	options = {
            "media": [
                {
                    "type": "text",
                    "text": "Hello World!"
                },
                {
                    "type": "link",
                    "url": "https://apiok.ru"
                },
                {
                    "type": "poll",
                    "question": "Do you like our API?",
                    "answers": [
                        { "text": "Yes" },
                        { "text": "No" }
                    ],
                    "options": "SingleChoice,AnonymousVoting"
                }
            ]
        }
        break
}

playgama_bridge_social_create_post(json_stringify(options))

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_create_post_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_create_post_callback(success) {
	if success {
		// your logic
	}
}

Add to Favorites

Allow players to bookmark your game for easy access in the future.

playgama_bridge_social_is_add_to_favorites_supported()

Check if the add to favorites functionality is supported on the platform.

playgama_bridge_social_add_to_favorites()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_add_to_favorites_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_add_to_favorites_callback(success) {
	if success {
		// your logic
	}
}

Add to Home Screen

Enable players to add a shortcut to your game on their home screen for quick access.

playgama_bridge_social_is_add_to_home_screen_supported()

Check if the add to home screen functionality is supported on the platform.

playgama_bridge_social_add_to_home_screen()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_add_to_home_screen_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_add_to_home_screen_callback(success) {
	if success {
		// your logic
	}
}

Rate Game

Encourage players to rate your game, providing valuable feedback and improving visibility.

playgama_bridge_social_is_rate_supported()

Check if the rate game functionality is supported on the platform.

playgama_bridge_social_rate()

// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_social_rate_callback" {
	if async_load[? "success"] {
		// your logic
	}
}

// callback via script
function playgama_bridge_social_rate_callback(success) {
	if success {
		// your logic
	}
}

Allow players to follow links to external websites, such as your game’s official site or related resources.

playgama_bridge_social_is_external_links_allowed()

Check if external links are allowed on the platform.

Last updated