asdasdsad
asdasdsad
  • 发布:2019-06-25 13:11
  • 更新:2021-07-12 22:27
  • 阅读:2025

App分享为微信小程序

分类:uni-app
复制代码uni.share({  
    provider: 'weixin',  
    type: 5,  
    imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/share-logo@3.png',  
    title: '欢迎体验uniapp',  
    miniProgram: {  
        id: 'gh_abcdefg',  
        path: 'pages/index/index',  
        type: 0,  
        webUrl: 'http://uniapp.dcloud.io'  
    },  
    success: ret => {  
        console.log(JSON.stringify(ret));  
    }  
});

提示:
无法分享到微信 由于不支持分享类型,无法分享到微信
问:
是不是不能用了这个功能,还是说我哪里没有设置

2019-06-25 13:11 负责人:无 分享
已邀请:
asdasdsad

asdasdsad (作者)

还是说要打包才能用。

asdasdsad

asdasdsad (作者)

有人吗

asdasdsad

asdasdsad (作者)

有人吗

asdasdsad

asdasdsad (作者)

有人吗

Geewoo_c

Geewoo_c

同问,楼主有解决了么

richie523

richie523

哪里配置的问题啊,我现在{"errMsg":"share:fail:[Share微信分享:-3]Unable to send, http://ask.dcloud.net.cn/article/287"} 遇到这个问题

  • asdasdsad (作者)

    uni.share({

    provider: 'weixin',

    type: 5,

    scene: 'WXSceneSession',

    imageUrl: '图片URL',

    title: '标题',

    miniProgram: {

    id: '原始ID',

    path: 小程序页面URL,

    type: 0,

    webUrl: 'ico图标'

    },

    success: function(res) {

    console.log(JSON.stringify(res));

    },

    fail: function(err) {

    console.log(JSON.stringify(err));

    }

    });

    2019-09-16 14:03

richie523

richie523

我分享就是那么写的啊,一样不行啊

风云杭州

风云杭州

遇到同样问题,苹果手机可以正常分享,安卓手机分享不行

y***@126.com

y***@126.com

具体啥事思考思考了

  • asdasdsad (作者)

    uni.share({

    provider: 'weixin',

    type: 5,

    scene: 'WXSceneSession',

    imageUrl: '图片URL',

    title: '标题',

    miniProgram: {

    id: '原始ID',

    path: 小程序页面URL,

    type: 0,

    webUrl: 'ico图标'

    },

    success: function(res) {

    console.log(JSON.stringify(res));

    },

    fail: function(err) {

    console.log(JSON.stringify(err));

    }

    });

    2019-09-16 14:03

asdasdsad

asdasdsad (作者)

要打包测试。

5***@qq.com

5***@qq.com - snakelenas

关键问题就在于

这个得有值,不能为空,随便填一个都行
webUrl: 'https://uniapp.dcloud.io'

8***@qq.com

8***@qq.com

注意:小程序分享的是微信小程序的 "原始ID" 不是 "APPID"

该问题目前已经被锁定, 无法添加新回复

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容