Skip to main content

Share

The share API is used to share a message to the user's feed.

Request Parameter

Facebook

ParameterTypeDescriptionRemark
third_typestringThird-party channel
Enter facebook for Facebook.
Required
app_idstringUnique app ID of the Facebook appRequired
hrefstringLink attached to the shared postRequired
displaystringDialog box rendering methods:
page
iframe
popup
touch
For more information, see Share Dialog.
Optional
redirect_uristringRedirect URL for clicking the button in the dialogOptional

Kakao

ParameterTypeDescriptionRemark
third_typestringThird-party channel
Enter kakao for Kakao.
Required
shareTypestringShare type
story: Kakao story
talk: Kakao talk
Required
jsKeystringkakao jskeyRequired
hrefstringURL of the shared page
When shareType is story, set title, background image and other settings to the shared page.
textstringAutomatically enterted text
Set to a null string when default text is not required.
Require when shareType is story
imageUrlstringBackground image URL of the shared pageRequire when shareType is talk
titlestringTitle of the shared pageRequire when shareType is talk
descriptionstringDescription of the shared pageOptional but pay attention when shareType is talk

Twitter

ParameterTypeDescriptionRemark
third_typestringThird-party channel
Enter twitter for Twitter.
Required
urlstringShared URL that is automatically shortened in a Tweet
A Twitter Card may appear for the shared URL.
Optional
viastringUse the via parameter to tag users (@username)Optional
textstringPreview of the text in Tweet editor
Tweet author can easily delete text with a single delete action.
Optional
hashtagsstringUse the hashtags parameter to add a comma-separated list of hashtags to TweetsOptional

VK

ParameterTypeDescriptionRemark
third_typestringThird-party channel
Enter vk for VK.
Required
urlstringURL of the shared contentRequired
imagestringImage URLOptional
titlestringTitle of the shared contentOptional

Request Sample

accountApi.share({
third_type: 'facebook',
href: 'https://test-common-web.intlgame.com/jssdk/map-demo.html',
hashtag: '#facebook',
app_id: 'xxxxx',
display: 'page',
redirect_uri: 'https://test-common-web.intlgame.com/jssdk/map-demo.html',
}).then((e)=>{
(res) => {
console.log(res);
}
});

Response Paramter

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message