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_idstringRequest a Unique Identifier for a Facebook AppRequired
hrefstringLinks attached to this postRequired
displaystringDialog box display options:
page
iframe
popup
touch
For more information, see Share Dialog Box.
Optional
redirect_uristringWhen the user clicks the button in the dialog box, they are redirected to this URL.Optional

X​

ParametersTypeExplanationNote
third_typestringThird-Party Channel
Type: twitter
Required
urlstringShared URLs will be automatically shortened in published tweets.
A card may appear when you share a URL.
Optional
viastringUse via parameter to tag users (@username)Optional
textstringText parameters appear preselected in the tweet editor.
The tweet author can easily delete the text with a single deletion action.
Optional
hashtagsstringUse hashtags parameter to add a comma-separated list of hashtags to the TweetOptional

VK​

ParametersTypeExplanationNote
third_typestringThird-Party Channel
Type: vk
Required
urlstringShare LinkRequired
imagestringPicture URLOptional
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);
}
});

Response parameters​

ParametersTypeExplanation
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation