java - 微信自定义菜单链接问题
巴扎黑
巴扎黑 2017-04-18 09:26:12
0
3
500
巴扎黑
巴扎黑

reply all(3)
黄舟

It turns out that I installed a program called weixinTest.java to modify the custom menu, but the main method does not execute automatically after the project is run. You need to manually click and run it to take effect.
WxTest.java------------------------------------------------- ----------------------------------
public class WxTest {

public static void main(String[] args) throws ParseException,IOException {
        AccessToken token= WeChatUtil.getAccessToken();
 //需要單獨運行創建或更新自定義 菜單

// if (token!=null&&token.getToken()!=null){
// System.out.println("Menu test-----");
// String menu= JSONObject.fromObject(WeChatUtil. initMenu()).toString();
// int result=WeChatUtil.createMenu(token.getToken(),menu);
// if (result==0){
// System.out.print("Create Menu successfuln");
// }else {
// System.out.print("Error code:"+result);
// }
// }
}

阿神

You need to wait 24 hours or re-follow WeChat after updating the menu

大家讲道理

When I used WeChat to test my account, my menu seemed to be written directly in a main function. Run it first, and then create the menu successfully. Start the server again.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template