# openAppSharePanel

> 主动唤起分享面板

### openAppSharePanel

> 主动唤起分享面板

#### 请求参数

| 参数       | 类型                          | 必填 | 说明         |
| ---------- | ----------------------------- | ---- | ------------ |
| `title`    | `string`                      | 是   | 分享标题     |
| `content`  | `string`                      | 否   | 分享内容     |
| `imageUrl` | `string`                      | 是   | 分享图片 URL |
| `url`      | `string`                      | 是   | 分享链接 URL |
| `success`  | `() => void`                  | 否   | 成功回调     |
| `fail`     | `(error: BridgeCode) => void` | 否   | 失败回调     |
| `complete` | `() => void`                  | 否   | 完成回调     |

#### 返回值

```js
Promise<void>
```

#### 示例代码

```js
import { openAppSharePanel } from '@kbapp/js-bridge'

openAppSharePanel({
    title: '开吧分享',
    content: '开吧，开汽车上新生活！',
    url: 'http://www.kaiba315.com.cn/',
    imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png',
    success() {
        console.log('打开分享面板成功')
    },
    fail(error) {
        console.log('打开分享面板失败', error)
    },
})
```

> 支持 Promise 风格调用
