使用微信sdk登陆时url schemes怎么写
发布网友
发布时间:2022-04-22 14:54
我来回答
共1个回答
热心网友
时间:2023-11-04 12:32
[mw_shl_code=java,true]
ShareParams sp = new ShareParams();
sp.setTitle("测试的标题");
sp.setTitleUrl("http://sharesdk.cn"); // 标题的超链接
sp.setText("测试的文本");
// Log.e("==", ""+childfile.getPath());
// sp.setImagePath(childfile.getPath());
// Bitmap bm=BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
// sp.setImageData(bm);
sp.setImageUrl("http://www.baidu.com/img/bdlogo.gif");
sp.setSite("呵呵");
sp.setSiteUrl("http://www.baidu.com");
Platform qzone = ShareSDK.getPlatform (ExpandActivity.this, WechatFavorite.NAME);
qzone. setPlatformActionListener (new PlatformActionListener() {
@Override
public void onError(Platform arg0, int arg1, Throwable arg2) {
Log.e("share", "onError");
}
@Override
public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {
Log.e("share", "onComplete");
}
@Override
public void onCancel(Platform arg0, int arg1) {
Log.e("share", "onCancel");
}
}); // 设置分享事件回调
// 执行图文分享
qzone.share(sp);[/mw_shl_code]