I created an app with the Wechat API. I try to post on my user's wall. I can publish on Wechat moments successfully on iOS (with the notice saying the app was not approved yet). However on Android, nothing happened.
Here is my code:
private IWXAPI api;
api = WXAPIFactory.createWXAPI(this, Constants.WECHAT_APP_ID);
api.registerApp(Constants.WECHAT_APP_ID);
String text = "Post on Wechat Wall";
WXTextObject textObj = new WXTextObject();
textObj.text = text;
WXMediaMessage msg = new WXMediaMessage();
msg.mediaObject = textObj;
msg.description = text;
boolean isChecked = false; // true
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = buildTransaction("text");
req.message = msg;
req.scene = isChecked ? SendMessageToWX.Req.WXSceneTimeline : SendMessageToWX.Req.WXSceneSession;
api.sendReq(req);
finish();
ps : Wechat didn't approve the app yet (submitted it 1 month ago). Could it be one of the reason?