Skip to main content

Share

The share API is used to share messages to user subscriptions.

Request parameters

Facebook

ParametersTypeExplanationNote
third_typestringThird-party channel
Type facebook
Required
app_idstringUnique identifier for the Facebook applicationRequired
hrefstringLink added to this postRequired
displaystringDialog presentation:
page
iframe
popup
touch
For more details, see Share Dialog.
Optional
redirect_uristringURL redirected to after clicking the button in the dialogOptional

X

ParametersTypeExplanationNote
third_typestringThird-party channel
Type twitter
Required
urlstringShared URL automatically shortened in published Tweet
A card may appear with the shared URL.
Optional
viastringUse via parameter to tag user (@username).Optional
textstringText parameter preselected in Tweet editor.
Tweet authors can easily delete text with a single remove action.
Optional
hashtagsstringUse hashtags parameter to add a comma-separated list of hashtags to the tweet.Optional

VK

ParameterTypeExplanationNote
third_typestringThird-party channel
Type vk
Required
urlstringShare linkRequired
imagestringImage addressOptional
titlestringTitleOptional

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);
}
});

Return Parameters

ParameterTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, see msg for detailed result description
msgstringResult description