Share
The share API is used to share messages to user subscriptions.
Request parameters
Facebook
| Parameters | Type | Explanation | Note |
|---|---|---|---|
| third_type | string | Third-party channel Type facebook | Required |
| app_id | string | Unique identifier for the Facebook application | Required |
| href | string | Link added to this post | Required |
| display | string | Dialog presentation: page iframe popup touch For more details, see Share Dialog. | Optional |
| redirect_uri | string | URL redirected to after clicking the button in the dialog | Optional |
X
| Parameters | Type | Explanation | Note |
|---|---|---|---|
| third_type | string | Third-party channel Type twitter | Required |
| url | string | Shared URL automatically shortened in published Tweet A card may appear with the shared URL. | Optional |
| via | string | Use via parameter to tag user (@username). | Optional |
| text | string | Text parameter preselected in Tweet editor. Tweet authors can easily delete text with a single remove action. | Optional |
| hashtags | string | Use hashtags parameter to add a comma-separated list of hashtags to the tweet. | Optional |
VK
| Parameter | Type | Explanation | Note |
|---|---|---|---|
| third_type | string | Third-party channel Type vk | Required |
| url | string | Share link | Required |
| image | string | Image address | Optional |
| title | string | Title | Optional |
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
| Parameter | Type | Description |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, see msg for detailed result description |
| msg | string | Result description |