Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124

/e/wxshare/http://你的域名/e/wxshare/index.php💡 建议使用服务号,确保有调用 JS-SDK 权限
<head> 中加入以下内容:<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="/e/wxshare/wxshare.js.php?url=<?=urlencode("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])?>"></script>
<button onclick="showQRCode()">分享到微信朋友圈</button>
<script src="/e/wxshare/wxqrcode.js"></script>
<script>
wx.ready(function () {
wx.updateTimelineShareData({
title: document.title,
link: window.location.href,
imgUrl: '[!--titlepic--]',
success: function () {
console.log('分享到朋友圈成功');
}
});
});
</script>
需在微信浏览器中打开页面,并通过 JS-SDK 正确配置
imgUrl。
检查 AppID/AppSecret 是否正确,域名是否已在公众号后台设置为 JS-SDK 安全域名。
如需高级功能(如自动生成短链接、多平台分享等),欢迎联系插件作者继续扩展。