微信分享到朋友圈事件,安卓可以使用,有的iphone用不了

jq_net 2015-01-06 01:47:18
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta name="apple-touch-fullscreen" content="yes">
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/share.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$(".showbox1").click(function () {
$("#TB_overlayBG").css({
display: "block", height: $(document).height()
});
$(".box1").css({

display: "block"
});
});
$(".close").click(function () {
$("#TB_overlayBG").css("display", "none");
$(".box1 ").css("display", "none");
});
})
</script>
</head>
<body>
<div class="page">
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<p class="bc_logo">
<img src="images/2(1)_01.jpg" /></p>
<div style="background: url(images/2_02.jpg) no-repeat; background-size: 100%">
<div class="abc">
<p class="tx">
<%=fromwxopenid_img %></p>
<p class="jt">
<img src="images/jt.png" /></p>
<p class="txt" id="jp_str">
<span id="help_count"></span>
</p>
</div>
</div>
<div class="content">
<p class="yybhb" id="jp_img">
<%=lb_img%><%--<img onclick="hdkj()" src="images/sdx.jpg"/>--%></p>
<p class="rr">
</p>
<p>
<img src="images/gf222.png"/></p>
<p>
<img onclick="tcsm()" src="images/gfb.png" /></p>
</div>
<p>
<img src="images/2_03_02.png" /></p>
<div class="hdgz">
<p class="hdgz_yyb">
<a href="javascript:void(0);" class="showbox1">
<img src="images/2(1)_06.jpg" /></a></p>
<div id="TB_overlayBG">
</div>
<div class="box1" style="display: none">
<h2 style="height: auto">
<img class="hd_yyb" src="images/g_06.png" /><a class="close"><img src="images/g_03.png" /></a></h2>
<div class="mainlist" style="">
<ul>
</ul>
</div>
<p style="width: 100%">
<img src="images/g_14.png" /></p>
</div>
<p class="aniu_yyb">
<a href="http://mp.weixin.qq.com/s?__biz=MjM5NzYyNjA0MA==&mid=201847387&idx=1&sn=5d8482914c006eff7b085dc5d1448373#rd">
<img src="images/2(1)_10.jpg" /></a></p>
<div class="yyb_hy">
<div class="yyb_hylist" id="help_str">
<%=str_md%>
</div>
</div>
</div>
</div>

</body>
</html>

<script type="text/javascript">

// 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
// 发送给好友
WeixinJSBridge.on('menu:share:appmessage', function (argv) {
shareFriend();
});
// 分享到朋友圈
WeixinJSBridge.on('menu:share:timeline', function (argv) {
WeiXinShareBtn();

//alert("分享");
});
}, false);

function WeiXinShareBtn() {
if (typeof WeixinJSBridge == "undefined") {
alert(" 请先通过微信搜索 ");
} else {
WeixinJSBridge.invoke('shareTimeline', {
"title": "笑嘻嘻笑嘻嘻系",
"link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f6a8ec4921f1229&redirect_uri=http://wxcar4s.com/yyb_active2/index1.aspx?fromwxopenid=<%=now_wxopenid%>&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect",
"desc": "笑嘻嘻笑嘻嘻系!",
"img_url": "http://game.wxcar4s.com/yyb_active/share.jpg"
}, function (d) {

});
}
}
function shareFriend() {
WeixinJSBridge.invoke('sendAppMessage', {
"img_url": "http://game.wxcar4s.com/yyb_active/share.jpg",
"img_width": "200",
"img_height": "200",
"link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f6a8ec4921f1229&redirect_uri=http://wxcar4s.com/yyb_active2/index1.aspx?fromwxopenid=<%=now_wxopenid%>&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect",
"desc": "我的车子要保养了,快来帮我抢个免单!",
"title": "我的车子要保养了,快来帮我抢个免单!"
}, function (res) {
//_report('send_msg', res.err_msg);
})
}
// function shareFriend() {
// alert(11);
// alert("<%=now_wxopenid%>");
// WeixinJSBridge.invoke('sendAppMessage', {
// "img_url": "http://game.wxcar4s.com/yyb_active/share.jpg",
// "img_width": "200",
// "img_height": "200",
// "link": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f6a8ec4921f1229&redirect_uri=http://wxcar4s.com/yyb_active2/index1.aspx?fromwxopenid=<%=now_wxopenid%>&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect",
// "desc": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f6a8ec4921f1229&redirect_uri=http://wxcar4s.com/yyb_active2/index1.aspx?fromwxopenid=<%=now_wxopenid%>&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect",
// "title": " 我的车子要保养了,快来帮我抢个免单!"
// }, function (res) {
// //_report('send_msg', res.err_msg);
// })
// }

// function closewin() {
// WeixinJSBridge.call("closeWindow");
// }
</script>
...全文
1266 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
小宫举 2017-08-11
  • 打赏
  • 举报
回复
你好,我也是做的微信自定义分享,目前也是iPhone分享问题,请问你解决了吗
qq_26448411 2015-12-19
  • 打赏
  • 举报
回复
有没有办法啊 我也遇到了
kaiyan5 2015-01-12
  • 打赏
  • 举报
回复
有没有人有办法呀
kaiyan5 2015-01-12
  • 打赏
  • 举报
回复
不会吧,我的也出现这个问题,ios上总是分享不能调用我的wxData
haoya1 2015-01-07
  • 打赏
  • 举报
回复
微信封了这个接口
jq_net 2015-01-06
  • 打赏
  • 举报
回复
发现威信是最新版本的都不行
jq_net 2015-01-06
  • 打赏
  • 举报
回复
两个的话是我自己后来测试加上去的,刚刚开始是一个的,怀疑是jquery问题所以就加了一个,结果还是不行!
  • 打赏
  • 举报
回复
浏览器兼容性问题吧? 顺带问下你为啥要引用两个jquery版本
jq_net 2015-01-06
  • 打赏
  • 举报
回复
微信链接为 https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f6a8ec4921f1229&redirect_uri=http://wxcar4s.com/yyb_active2/index1.aspx?response_type=code&scope=snsapi_base&state=1&connect_redirect=1&from=singlemessage&isappinstalled=0#wechat_redirect

62,242

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧