收藏
回答

IWWAPIEventHandler 分享链接后无回调?(不管点留在企业微信还是返回APP都不行)

IWWAPI api = getApi(mContext);
api.registerApp(SCHEMA);
final WWMediaLink link = new WWMediaLink ();
link.thumbUrl = shareInfo.getImageUrl();
link.webpageUrl = shareInfo.getClickLink();
link.title = shareInfo.getTitle();
link.description = shareInfo.getContent();
link.appPkg = mContext.getPackageName();
link.appName = mContext.getString(R.string.app_name);
link.appId = APPID;
link.agentId = AGENTID;

api.sendMessage(link, new IWWAPIEventHandler() {
    @Override
    public void handleResp(BaseMessage resp) {
        if(resp instanceof WWAuthMessage.Resp){
            WWAuthMessage.Resp rrsp = (WWAuthMessage.Resp) resp;
            if(rrsp.errCode == WWAuthMessage.ERR_CANCEL){
                listener.onCancel("分享取消");
            }else if(rrsp.errCode == WWAuthMessage.ERR_FAIL){
                listener.onFailure("分享失败");
            }else if(rrsp.errCode == WWAuthMessage.ERR_OK){
                listener.onSuccess("分享成功");
            }
        }
    }
});


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签