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 | Request a Unique Identifier for a Facebook App | Required |
| href | string | Links attached to this post | Required |
| display | string | Dialog box display options: page iframe popup touch For more information, see Share Dialog Box. | Optional |
| redirect_uri | string | When the user clicks the button in the dialog box, they are redirected to this URL. | Optional |
X
| Parameters | Type | Explanation | Note |
|---|---|---|---|
| third_type | string | Third-Party Channel Type: twitter | Required |
| url | string | Shared URLs will be automatically shortened in published tweets. A card may appear when you share a URL. | Optional |
| via | string | Use via parameter to tag users (@username) | Optional |
| text | string | Text parameters appear preselected in the tweet editor. The tweet author can easily delete the text with a single deletion action. | Optional |
| hashtags | string | Use hashtags parameter to add a comma-separated list of hashtags to the Tweet | Optional |
VK
| Parameters | Type | Explanation | Note |
|---|---|---|---|
| third_type | string | Third-Party Channel Type: vk | Required |
| url | string | Share Link | Required |
| image | string | Picture URL | 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);
}
});
Response parameters
| Parameters | Type | Explanation |
|---|---|---|
| ret | number | Return code 0: Request successful !=0: Request failed, refer to msg for detailed results |
| msg | string | Result Explanation |