Web Share Feature
After integrating a third-party channel that supports social features for the game, implement the sharing function according to the instructions in Share.
Facebook
Use the share function to share content to Facebook.
accountApi.share({
third_type: 'facebook',
href: '',
hashtag: '#facebook share demo',
app_id: 'xxxxx',
display: 'popup',
})
Parameter Description:
| Parameter | Type | Description | Required |
|---|---|---|---|
| third_type | string | Third-party channel type: facebook | Required |
| app_id | string | The unique identifier of the Facebook application | Required |
| href | string | The link attached to this post | Required |
| display | string | Dialog display mode: page, iframe, popup, touchFor more details, see Share Dialog | Optional |
| redirect_uri | string | The URL to redirect to after the user clicks a button in the dialog | Optional |
Kakao
Use the share function to share content to Kakao Story or Kakao Talk.
accountApi.share({
third_type: 'kakao',
shareType: '',
jsKey: '',
href: '',
text: '',
imageUrl: '',
title: '',
description: ''
})
Parameter Description:
| Parameter | Type | Description | Required |
|---|---|---|---|
| third_type | string | Third-party channel type: kakao | Required |
| shareType | string | Share type:story - Kakao Storytalk - Kakao Talk | Required |
| jsKey | string | Kakao JavaScript Key | Required |
| href | string | Share page URL When shareType is story, you can set background image and title | Required |
| text | string | Automatically input text Set to empty string '' if no default text is needed | Required for story type |
| imageUrl | string | Background image URL of the share page | Required for talk type |
| title | string | Title of the share page | Required for talk type |
| description | string | Description of the share page | Optional for talk type |
X
Use the share function to share content to X
accountApi.share({
third_type: 'twitter',
url: '',
text: '',
hashtag: '#twitter share demo',
})
Parameter Description:
| Parameter | Type | Description | Required |
|---|---|---|---|
| third_type | string | Third-party channel type: twitter | Required |
| url | string | Shared URL, will be automatically shortened in the tweet Shared URL may appear as a card | Optional |
| via | string | Use the via parameter to tag user (@username) | Optional |
| text | string | Text pre-filled into the tweet editor User can easily remove it | Optional |
| hashtags | string | Comma-separated list of hashtags | Optional |
VK
Use the share function to share content to VK.
accountApi.share({
third_type: 'vk',
url: '',
image: '',
title: 'vk share demo',
})
Parameter Description:
| Parameter | Type | Description | Required |
|---|---|---|---|
| third_type | string | Third-party channel type vk | Required |
| url | string | Share URL | Required |
| image | string | Image URL | Optional |
| title | string | Title | Optional |