当前位置:网站首页>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);
});
});
边栏推荐
- Golang - command line tool Cobra
- Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride( 从零开始的基于百度大脑EasyData的多人协同数据标注
- JVM class loading
- Collection of mobile adaptation related articles
- Generate directories from web content
- Multi person collaborative data annotation based on Baidu brain easydata from scratch
- Common network state detection and analysis tools
- 全局事件总线
- Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
猜你喜欢

JVM runtime data area

QT learning 17 dialog box and its types

Multi person collaborative data annotation based on Baidu brain easydata from scratch

Redis: commandes d'action pour les données de type chaîne

Configure stylelint

Qt学习25 布局管理器(四)

Rasp implementation of PHP

解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Current situation, analysis and prediction of information and innovation industry

Common network state detection and analysis tools
随机推荐
3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)
page owner特性浅析
Page generation QR code
金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂
叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
UiO-66-COOH装载苯达莫司汀|羟基磷灰石( HA) 包裹MIL-53(Fe)纳米粒子|装载黄芩苷锰基金属有机骨架材料
jvm-对象生命周期
Qt学习24 布局管理器(三)
Use and design of Muduo buffer class
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
【BW16 应用篇】安信可BW16模组与开发板更新固件烧录说明
How to delete an attribute or method of an object
MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
Redis:字符串類型數據的操作命令
Common network state detection and analysis tools
Scroll detection of the navigation bar enables the navigation bar to slide and fix with no content
SQL Injection (AJAX/JSON/jQuery)
Conversion function and explicit
信创产业现状、分析与预测
金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])