This article mainly introduces the method of creating a WeChat custom menu in PHP. It analyzes the principles, steps and specific implementation techniques of creating a WeChat custom menu in PHP with examples. Friends in need can refer to it. I hope it can help everyone. .
Before using the common interface, you need to do the followingtwo-step work:
1. Have a WeChat public account and obtain theappidandappsecret(apply for internal beta qualification on the public platform and obtain it after passing the review)
2. Obtainaccess_token
through the certificate acquisition interfaceNote:
access_token is a ticket for third-party access to api resources;
access_token corresponds to the official account and is a globally unique ticket. Repeated acquisition will result in the last access_token obtained. Invalid.
Visit the following address (note to replace your appid and secret):
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid =APPID&secret=APPSECRET
Then you can see the return information in the browser:
{"access_token":"这里就是你的access_token","expires_in":7200}
Create a custom menu:
Copy after login
Related recommendations:
PHP code to implement the custom menu interface in the WeChat public account enterprise account
PHP implementation of creating WeChat custom menu instance
The above is the detailed content of How to create WeChat custom menu with PHP. For more information, please follow other related articles on the PHP Chinese website!