Summary of WeChat JSSDK sharing api problems

Now the JSSDK version has been updated to 1.6.0, so there will be a lot of compatibility issues
. 1. WeChat sharing personally displays pictures and texts , but sharing to the group will directly display the link.
Here are the different display
Insert picture description here
solutions for sharing to individuals and groups : (1) Update jssdk (1.4.0 and above) and related sharing api; (2) Contact official personnel to see if any illegal operations in the product have been removed from the shelves, and it will be
fine after the change . 2. Share to the enterprise WeChat display The content does not match the content shared to WeChat. The
following is the display on the dangerous WeChat terminal and the enterprise WeChat terminal. The WeChat display is normal, but the title and connection link displayed on the enterprise WeChat are not correct. Insert picture description here
Solution: Add the old version of the WeChat fan line api Go up, because the corporate WeChat version may not be compatible with the new version of WeChat api


 var jssdkconfig={
    
     
 	appId: ""
	nonceStr: ""
	timestamp: ""
	signature: ",
	url: "",
	debug: false,
	jsApiList :['updateTimelineShareData','updateAppMessageShareData','onMenuShareAppMessage','onMenuShareTimeline']  
} 
var shareData={
    
    
	linkurl:'',
	imgurl:'',
	desc:'',
	title:''
}
              
wx.config(jssdkconfig);
wx.ready(function () {
    
    
    wx.showOptionMenu();
	wx.onMenuShareAppMessage(shareData);
	wx.onMenuShareTimeline(shareData);
	wx.updateAppMessageShareData(window.shareData);
	wx.updateTimelineShareData(window.shareData);
})

Guess you like

Origin blog.csdn.net/lwdyxweb/article/details/106300775
Recommended