当前位置:网站首页>Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
2022-07-03 14:07:00 【Cupid510】
matters needing attention :
1、 The image size should be larger than 300 To display ;
2、 This method must first config success , And then again wx.ready In order to call .
3、 Scan the code to enter , spot URL The link will only be displayed in the sharing place url, Don't show icons 、 title
wx.config({
debug: true, // Turn on debugging mode , Call all api The return value of will be on the client side alert come out , To see the parameters passed in , Can be in pc End open , The parameter information will go through log play , Only in pc Only when the end is printed .
appId: '{$appid}', // Required , The only sign of official account number
timestamp: "{$signPackage.timestamp}", // Required , Generate signature timestamp
nonceStr: '{$signPackage.nonceStr}', // Required , Generate a random string of signatures
signature: '{$signPackage.signature}',// Required , Signature , See appendix 1
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'chooseWXPay'
] // Required , Required JS Interface list , all JS See Appendix... For the list of interfaces 2
});
wx.ready(function () {
wx.onMenuShareTimeline({
title: option.title, // Share the title
desc: option.desc, // Share description
link: option.link, // Share links
imgUrl: option.imgUrl, // Share icon
success: function () {
// Callback function executed after user confirms sharing
alert(' Share success ');
},
cancel: function () {
// Callback function executed after user cancels sharing
}
});
wx.error(function(res){
// config Information validation failure will be executed error function , If the signature expires and the verification fails , Specific error messages can be opened config Of debug Mode view , You can also go back to res View in parameters , about SPA You can update your signature here .
alert("errorMSG:"+res);
});
});
边栏推荐
- [bw16 application] instructions for firmware burning of Anxin Ke bw16 module and development board update
- Mysql:insert date:sql error [1292] [22001]: data truncation: incorrect date value:
- 项目协作的进度如何推进| 社区征文
- Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride( Redis: commandes d'action pour les données de type chaîne
- Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
- JVM class loading
- Generate directories from web content
- JVM垃圾回收机
- 金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])
猜你喜欢
[understanding by chance-37]: the structure of human sensory system determines that human beings are self-centered
[技术发展-24]:现有物联网通信技术特点
JVM object lifecycle
Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
Summary of common error reporting problems and positioning methods of thrift
[Jilin University] information sharing of postgraduate entrance examination and re examination
GoLand 2021.1: rename the go project
[technology development-24]: characteristics of existing IOT communication technology
Qt学习17 对话框及其类型
Comprehensive case of MySQL data addition, deletion, modification and query
随机推荐
Go language web development series 26: Gin framework: demonstrates the execution sequence of code when there are multiple middleware
Reflection -- basic usage
QT learning 25 layout manager (4)
[développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes
金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子
可编程逻辑器件软件测试
Generate directories from web content
FPGA测试方法以Mentor工具为例
Vite project commissioning
金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
Redis:字符串类型数据的操作命令
Qt学习18 登录对话框实例分析
Mysql:insert date:sql error [1292] [22001]: data truncation: incorrect date value:
怎样删除对象的某个属性或⽅法
QT learning 24 layout manager (III)
Use vscode to view hex or UTF-8 codes
信创产业现状、分析与预测
Halcon combined with C # to detect surface defects -- Halcon routine autobahn
Depth and breadth first traversal of tree (regardless of binary tree)
项目协作的进度如何推进| 社区征文