|
/

分享图片到朋友圈无法调起微信

C*少华
发布于 4 年前
433来自天津
移动统计 U-App

分享图片到朋友圈,代码如下,无法调起微信

UMImage umImage = new UMImage(context, file);

umImage.setTitle("00");
umImage.setDescription("88");
umImage.setThumb(umImage);
new ShareAction(activity).setPlatform(SHARE_MEDIA.WEIXIN_CIRCLE)
.withMedia(umImage)
.withText("11")
.setCallback(umShareListener)
.share();

在callback中onStart方法调用了其他没有调用。

而分享网络连接到朋友圈是没问题的

UMWeb web = new UMWeb(shareBean.getImage());
web.setTitle("11");
web.setDescription("22");
web.setThumb(image);

new ShareAction(activity)
.withMedia(web)
.setPlatform(SHARE_MEDIA.WEIXIN_CIRCLE)
.setCallback(umShareListener)
.share();

问题出在哪里了

初始话设置

PlatformConfig.setWeixin("xxxxxxxx", "xxxxxxxxxx");
PlatformConfig.setWXFileProvider("com.xxxx.xxxx.fileprovider")

4个回答
 
4 年前
来自上海

官方demo可以么,楼主可以试试demo

 
4 年前
来自浙江省

你好,你是安卓还是ios

Loading ...
登录社区,分享你的经验