Example , When creating a wechat official account custom menu , Program :
# Create applet menu
def create_public_menu():
# obtain token
token = get_access_token()
# json Request data
payload = {
"button": [
{
"type": "miniprogram",
"name": " Applet ",
"url": "https://mp.weixin.qq.com",
"appid": "appid",
"pagepath": "pages/index/index"
}
]
}
res = requests.post('https://api.weixin.qq.com/cgi-bin/menu/create?access_token=%s' % (token,), json=payload)
print(json.dumps(res.json(), ensure_ascii=False, indent=2))
pass
The wechat public platform system returned an error :
{
"errcode": 40033,
"errmsg": "invalid charset. please check your request, if include \\uxxxx will create fail! ri
讓用戶提交 Python 代碼並在服務器上執行,是一些 OJ
Recently, many readers and cla