Closed wesson818 closed 9 years ago
Sorry, i haven't fully tested it on Android.
Could you please provide more details, like android version, phonegap version, and error message here? Maybe I can help you on that.
I am on Android SDK 4.2.2 and PhoneGap version 3.1.0. The error happened when I first build after I add the plugin. Error message point to Wechat.java file say: "Can not find the public class of Weixin". I think is something between Wechat.java and libammsdk.jar.
That's because the class name of the Wechat.java is Weixin. You may fix that by renaming the class name from Weixin to Wechat.
I changed Weixin to Wechat. And then build successful, but the function is not working. It seems doesn't calling libammsdk.jar lib function.
does the problem solved? I have the same problem on andriod build
Not yet.
would you plan to solve this?
Sorry, I won't fix that until I need that in my project, or there are a lot of people want to use that.
@icesyc you need change "webView.getProperty(WXAPPID_PROPERTY_KEY, "");" to your appid from WeChat to make it work in Wechat.java.
@wesson818 you are right. actually, the WXAPPID_PROPERTY_KEY is defined as "weixinappid" in Wechat.java, but in config.xml, there is "wechatappid", correct the const string to the same in config.xml is needed.
@icesyc have u solved this problem? I changed WXAPPID_PROPERTY_KEY
to wechatappid
, same as config.xml, but it still not work, any ideas would be appriated, 3q!
问题解决了,不是代码的问题,appid有问题,谢谢!
安卓分享成功没有调用回调函数,请核查一下,谢谢!
额,暂时没有android手机,而且去微信开放平台看了一下,好像我的帐号没有通过开发者认证,不能用了。。。
如果方便的话,能否共享一下你的帐号给我?
多谢。
安卓的需要在wxentry里添加回调
发自我的 iPhone
在 2014年9月5日,9:16,"zero.qiu" notifications@github.com 写道:
安卓分享成功没有调用回调函数,请核查一下,谢谢!
— Reply to this email directly or view it on GitHub.
Hi,I following the same steps. auth success but share nothing happen. Would you please help to check any issue in my code. Wechat.isInstalled(function (installed) { WEIXININSTALL=installed; });
/***************微信登录**************/
Wechat.auth("snsapi_userinfo", function (response) {
// you may use response.code to get the access token.
alert(JSON.stringify(response));
}, function (reason) {
alert("Failed: " + reason);
});
Wechat.share({
message: {
title: "分享",
description: "描述",
mediaTagName: "分享",
thumb: "分享的时候的图片链接",
media: {
type: Wechat.Type.WEBPAGE, //类型是一个webpage,就是一个网页?
webpageUrl: "www.baidu.com"
}
},
scene: Wechat.Scene.TIMELINE // 分享到朋友圈
}, function () {
alert("分享成功");
}, function (reason) {
alert("分享失败"+reason);
});
Thanks so much
thumb 不是文字,是图片链接。webpageUrl改成http://www.baidu.com。
On Thu, May 19, 2016 at 3:28 PM, zilinxueyue notifications@github.com wrote:
Hi,I following the same steps. auth success but share nothing happen. Would you please help to check any issue in my code. Wechat.isInstalled(function (installed) { WEIXININSTALL=installed; });
/***************微信登录**************/ Wechat.auth("snsapi_userinfo", function (response) { // you may use response.code to get the access token. alert(JSON.stringify(response)); }, function (reason) { alert("Failed: " + reason); }); Wechat.share({ message: { title: "分享", description: "描述", mediaTagName: "分享", thumb: "分享的时候的图片链接", media: { type: Wechat.Type.WEBPAGE, //类型是一个webpage,就是一个网页? webpageUrl: "www.baidu.com" } }, scene: Wechat.Scene.TIMELINE // 分享到朋友圈 }, function () { alert("分享成功"); }, function (reason) { alert("分享失败"+reason); });
Thanks so much
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub https://github.com/xu-li/cordova-plugin-wechat/issues/1#issuecomment-220247991
Xu Li, Shanghai, China
Hi, xu-li 我用了你的方法 打包release 版本后,第一次可以分享成功,但是第二次分享就没有响应了。我的退出微信登录,再次登录后,又可以分享一次,然后第二次又没有响应了。请问这个问题怎么解? Thanks‘
@xu-li 多谢你的分享,我试过了 现在可以用了。是2次分享要有时间间隔,过一会再分享就ok了。 Thanks
Hi xu-li,
Great plugin! But when I try to build for Android, build Failed.
The step I installed it is:
And then BUILD FAILED. I also add preference name="wechatappid" value="YOUR_WECHAT_APP_ID" to config.xml.
Do I missed some steps? Could you help me with this?
Many thanks!
Wesson