我在做uniapp的分享qq功能
分享到微信的时候没有问题,但是在分享到qq的时候提示传入的参数有误,可是我查了不少,他们的写法和我一模一样,为什么我的就会有问题
具体是什么问题呢,表述出来哇
<template>
<view>
<button type="primary" @click="shareQQ">分享到QQ</button>
</view>
</template>
<script>
export default {
methods: {
shareQQ() {
uni.share({
provider: 'qq',
type: 5, // 分享类型,5代表图文链接
imageUrl: 'https://example.com/image.png',
title: '分享标题',
summary: '分享描述',
href: 'https://example.com',
success() {
uni.showToast({
title: '分享成功',
icon: 'success'
})
},
fail(err) {
uni.showToast({
title: '分享失败:' + err.errMsg,
icon: 'none'
})
}
})
}
}
}
</script>